-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (21 loc) · 895 Bytes
/
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
cmake_minimum_required(VERSION 3.22)
project(RayTracing C CXX)
execute_process(COMMAND git rev-parse --show-toplevel OUTPUT_VARIABLE RAYTRACING_SRC_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_C_CLANG_TIDY clang-tidy -checks="*" -header-filter=.)
set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks="*" -header-filter=.)
include(GNUInstallDirs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
add_subdirectory(src)
add_subdirectory(inc)
enable_testing()
add_subdirectory(tests)
add_custom_target(format
COMMAND "${RAYTRACING_SRC_DIR}/format"
USES_TERMINAL
)