summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-04-17 20:34:35 +0800
committerKeuin <[email protected]>2022-04-17 20:34:35 +0800
commitbf1bfa34d5ad0e41379179fb9d2dfe0e2cb372f6 (patch)
treed3da5942784cead371eec03cdf897963f699bf5c
parentdda159f5ff347c0ffbc091c92f469749f2c043f2 (diff)
Bugfix: wrong cmake config caused not compiling on debian 5.10.
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd4d71f..6924727 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,14 +4,16 @@ project(rt)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
-set(CMAKE_EXE_LINKER_FLAGS "-latomic")
-set(common_compiler_args "-Wall -Werror -Wno-unused -std=c++11 -pthread")
+set(common_compiler_args "-Wall -Werror -Wno-unused -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${common_compiler_args} -g -ggdb -fsanitize=address -DDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${common_compiler_args} -O2")
set(CMAKE_VERBOSE_MAKEFILE on)
+link_libraries(pthread)
+link_libraries(atomic)
+
# main executable
add_executable(rt main.cpp vec.h bitmap.h ray.h bitfont.h hitlist.h object.h sphere.h viewport.h aa.h material.h material_diffusive.h material_diffusive.cpp material_reflective.h material_reflective.cpp material_dielectric.cpp material_dielectric.h tracelog.h threading.h)