Added debug flags

This commit is contained in:
ksuprynowicz 2021-11-01 13:15:45 +01:00
parent 9221d33ed2
commit a94541d7e9

View file

@ -95,11 +95,11 @@ if( NOT WIN32 )
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/_env/VIRCADIA_OPTIMIZE.txt" "${VIRCADIA_OPTIMIZE}")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message("Clang compiler detected, adding -O3 -fPIC flags")
set(VIRCADIA_OPTIMIZE_FLAGS "-O3 -fPIC")
message("Clang compiler detected, adding -O3 -fPIC -g flags")
set(VIRCADIA_OPTIMIZE_FLAGS "-O3 -fPIC -g")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
message("GCC compiler detected, adding -O3 -fPIC flags")
set(VIRCADIA_OPTIMIZE_FLAGS "-O3 -fPIC")
message("GCC compiler detected, adding -O3 -fPIC -ggdb flags")
set(VIRCADIA_OPTIMIZE_FLAGS "-O3 -fPIC -ggdb")
else()
message("No predefined optimization flags for compiler ${CMAKE_CXX_COMPILER_ID}")
endif()