cmake: Add options to disable setting -g1 when using unix or libbfd

pull/642/head
Jonathan G Rennison 3 months ago
parent 770915ccc2
commit 39951c526b

@ -66,7 +66,7 @@ macro(test_compile_libbfd var libs)
endif ()
if (BFD_FOUND OR UNIX)
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR OPTION_NO_LINE_TABLE))
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")

Loading…
Cancel
Save