-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
68 lines (61 loc) · 1.86 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 3.10)
project(cursedray)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_compile_options(
"-Wall"
"-Wextra"
"-Werror"
"-Wundef"
"-Wshadow"
"-Wpointer-arith"
"-Wcast-align"
"-Wwrite-strings"
"-Wswitch-enum"
"-Wcast-qual"
"-Wconversion"
"-Wduplicated-cond"
"-Wnon-virtual-dtor"
"-Woverloaded-virtual"
"-Wformat-nonliteral"
"-Wformat-security"
"-Wformat-y2k"
"-Wformat=2"
"-Wno-unused-parameter"
"-Wunused"
"-Winvalid-pch"
"-Wlogical-op"
"-Wmissing-declarations"
"-Wmissing-field-initializers"
"-Wmissing-format-attribute"
"-Wmissing-include-dirs"
"-Wmissing-noreturn"
"-Wpacked"
"-Wredundant-decls"
"-Wstack-protector"
"-Wstrict-null-sentinel"
"-Wdisabled-optimization"
"-fno-rtti"
"-Wno-suggest-attribute=format"
"-DGLM_ENABLE_EXPERIMENTAL"
)
set(CMAKE_CXX_FLAGS_DEBUG "-g -D_DEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -s -march=native -mtune=native -flto -DNDEBUG")
set(SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/CursedRay.cpp
${CMAKE_SOURCE_DIR}/src/Framebuffer.cpp
${CMAKE_SOURCE_DIR}/src/HWDevice.cpp
${CMAKE_SOURCE_DIR}/src/Log.cpp
${CMAKE_SOURCE_DIR}/src/NCDevice.cpp)
set(HEADER_FILES ${CMAKE_SOURCE_DIR}/include/Framebuffer.hpp
${CMAKE_SOURCE_DIR}/include/Camera.hpp
${CMAKE_SOURCE_DIR}/include/HWDevice.hpp
${CMAKE_SOURCE_DIR}/include/Log.hpp
${CMAKE_SOURCE_DIR}/include/NCDevice.hpp)
include_directories (
"${CMAKE_SOURCE_DIR}/include"
"${CMAKE_SOURCE_DIR}/submodules/glm"
)
set(LIBS ${LIBS} notcurses notcurses-core m pthread OpenCL)
add_executable(cray ${HEADER_FILES} ${SOURCE_FILES})
target_link_libraries(cray PUBLIC ${LIBS})