From e70bf1707730823c81e3db5c19b33987a2049ff5 Mon Sep 17 00:00:00 2001 From: oleg Date: Mon, 16 Dec 2024 09:34:40 +0300 Subject: [PATCH] Build with gcc and debug symbols --- server/CMakeLists.txt | 4 +++- server/build.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 38332edf..d23018c4 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -82,7 +82,9 @@ if(WIN32 AND MSVC) add_definitions(/MP) endif() -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") +if (CMAKE_CXX_COMPILER_ID MATCHES "gcc") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") + target_compile_options(${PROJECT_NAME} PRIVATE #-falign-functions #-faligned-allocation diff --git a/server/build.sh b/server/build.sh index 4b428b47..306813ed 100755 --- a/server/build.sh +++ b/server/build.sh @@ -8,7 +8,7 @@ if [ ! -d "./build-linux" ]; then mkdir build-linux fi cd build-linux -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-9 -DJS_MODULE_VERSION=$VERSION .. +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=gcc -DJS_MODULE_VERSION=$VERSION .. cmake --build . --config Release cd ..