ThreadedExamples/example02_threaded_raytracing/CMakeLists.txt
2021-08-21 11:29:31 +09:00

22 lines
675 B
CMake

cmake_minimum_required(VERSION 3.9)
project(Example02)
set(Example02_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/argParse.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/rayTracer.cpp")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
if(NOT CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" MATCHES ^$)
set(CMAKE_BUILD_TYPE "Debug")
message("CMAKE_BUILD_TYPE is set to Debug by default")
endif()
add_executable(Example02
${Example02_SOURCES})
target_link_libraries(Example02 PUBLIC pthread)
target_compile_features(Example02 PUBLIC cxx_std_17)