-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
28 lines (21 loc) · 808 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
28 lines (21 loc) · 808 Bytes
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
# OPTIMISATION FLAGS :
set(OPT_FLAGS, "-Ofast")
# END OPTIMIZATION FLAGS
# SOURCES :
# Put all your sources here EXCEPT YOUR MAIN.CPP
set(SRC_RAYTRACER)
# Directories containing headers must be specified in the include_directories()
include_directories(src)
# END SOURCES
# SETUP
cmake_minimum_required(VERSION 3.12)
project(Raytracer)
# BUILD OPTIONS
set(CMAKE_CXX_STANDARD 17)
# -Wall -Werror -Wextra -pedantic
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OPT_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g3 -fsanitize=address")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
add_executable(raytracer)
target_sources(raytracer PRIVATE "src/main.cpp" ${SRC_RAYTRACER})