Do not hide symbols in debug mode so backtraces can display function info

master
Ismael Gomez 4 years ago
parent 66aa34d173
commit 1d0e5d725f

@ -337,9 +337,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif(HAVE_AVX) endif(HAVE_AVX)
endif (HAVE_AVX2) endif (HAVE_AVX2)
# Do not hide symbols in debug mode so backtraces can display function info.
if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if(NOT WIN32) if(NOT WIN32)
ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_CXX) ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_CXX)
endif(NOT WIN32) endif(NOT WIN32)
endif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if(FORCE_32BIT) if(FORCE_32BIT)
ADD_C_COMPILER_FLAG_IF_AVAILABLE("-m32" HAVE_WNO_UNUSED_BUT_SET_VARIABLE) ADD_C_COMPILER_FLAG_IF_AVAILABLE("-m32" HAVE_WNO_UNUSED_BUT_SET_VARIABLE)
@ -427,9 +430,12 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
message(FATAL_ERROR "no SIMD instructions found") message(FATAL_ERROR "no SIMD instructions found")
endif(NOT HAVE_SSE AND NOT HAVE_NEON AND NOT DISABLE_SIMD) endif(NOT HAVE_SSE AND NOT HAVE_NEON AND NOT DISABLE_SIMD)
# Do not hide symbols in debug mode so backtraces can display function info.
if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if(NOT WIN32) if(NOT WIN32)
ADD_C_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_C) ADD_C_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_C)
endif(NOT WIN32) endif(NOT WIN32)
endif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if (ENABLE_ASAN AND ENABLE_MSAN) if (ENABLE_ASAN AND ENABLE_MSAN)
message(FATAL_ERROR "ASAN and MSAN cannot be enabled at the same time.") message(FATAL_ERROR "ASAN and MSAN cannot be enabled at the same time.")
@ -464,7 +470,7 @@ if("Ninja" STREQUAL ${CMAKE_GENERATOR})
endif() endif()
# Add -Werror to C/C++ flags for newer compilers # Add -Werror to C/C++ flags for newer compilers
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif() endif()

Loading…
Cancel
Save