diff --git a/CMakeLists.txt b/CMakeLists.txt index 160e39ae5a..aaafe2b3fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()