mirror of
https://github.com/ssloy/tinyraytracer.git
synced 2025-01-16 13:48:41 +01:00
21 lines
518 B
CMake
21 lines
518 B
CMake
cmake_minimum_required (VERSION 2.8)
|
|
project(tinyraytracer)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
find_package(OpenMP)
|
|
if(OPENMP_FOUND)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
|
|
endif()
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
endif()
|
|
|
|
file(GLOB SOURCES *.h *.cpp)
|
|
add_executable(${PROJECT_NAME} ${SOURCES})
|
|
|