CMake: Also add -g1/-gline-tables-only to linker options

pull/491/head
Jonathan G Rennison 1 year ago
parent 968709735d
commit 5efe3a8b5b

@ -69,8 +69,10 @@ macro(test_compile_libbfd var libs)
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
add_compile_options(-gline-tables-only)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -gline-tables-only")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-g1)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g1")
endif ()
endif ()
endif ()

Loading…
Cancel
Save