diff --git a/.gitignore b/.gitignore index 2e933d553..df577f6bd 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ cpp/tests/results/matchsgfs2/games.sgfs cpp/data/ versions/ cpp/build +cpp/cmake-build* cpp/out export_model_cuda.sh diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 8db79ca73..864bb8ce3 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -572,7 +572,9 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "C find_package (Threads REQUIRED) target_link_libraries(katago Threads::Threads) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -pedantic -Wall -Wextra -Wno-sign-compare -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Wmissing-declarations -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-overflow=1 -Wswitch-default -Wfloat-conversion -Wunused") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-sign-compare -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Wmissing-declarations -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-overflow=1 -Wswitch-default -Wfloat-conversion -Wunused") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g3 -O0 -fno-omit-frame-pointer") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -g -O2 -DNDEBUG") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") message(STATUS "Enabling GNU-specific build options.")