Solve -rdynamic flag for RelWithDebInfo compile type.
@@ -205,7 +205,7 @@ if (PROJECT_OS_FAMILY MATCHES "unix")
# Debug symbols
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
add_compile_options(-g)
- add_link_options(-rdynamic)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
endif()
# Optimizations
