-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
75 lines (54 loc) · 1.68 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
69
70
71
72
73
74
# CMakeLists.txt
cmake_minimum_required ( VERSION 3.1.0...3.27.0 )
project ( RTWeekend LANGUAGES CXX )
# Set the C++ standard to C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set ( CMAKE_CXX_EXTENSIONS ON )
# Add the include directory to the project
# Add the source files to the project
set(SOURCES
# src/main.cpp # Uncomment this line if main.cpp is your main source file
include/color.hpp
include/ray.hpp
include/sphere.hpp
include/vec3.hpp
include/interval.hpp
include/camera.hpp
include/hittable.hpp
include/hittable_list.hpp
include/utils.hpp
include/material.hpp
src/after_refactoring.cpp
)
include_directories(include)
add_executable(scene ${SOURCES})
# message (STATUS "Compiler ID: " ${CMAKE_CXX_COMPILER_ID})
# target_compile_options(scene PRIVATE
# # Common optimization flags
# -O1
# )
# # Compiler-specific optimization flags
# if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# target_compile_options(scene PRIVATE
# /Ox # Full optimization
# )
# elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# target_compile_options(scene PRIVATE
# -march=native # Architecture-specific optimization
# -funroll-loops # Loop unrolling
# )
# elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# target_compile_options(scene PRIVATE
# -march=native # Architecture-specific optimization
# -funroll-loops # Loop unrolling
# )
# endif()
# Create the library
# add_library(scene STATIC src/Scene_rays.cpp)
# Create the executable
# add_executable(main ${SOURCES})
# Set the output directory for the executables
# set_target_properties(main PROPERTIES
# RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/src"
# )