Turn on -g unconditionally
This commit is contained in:
parent
060272be5a
commit
b93028921b
@ -6,6 +6,7 @@ macro(add_test_dependencies exec_name)
|
|||||||
target_compile_features(${exec_name} PRIVATE cxx_std_11)
|
target_compile_features(${exec_name} PRIVATE cxx_std_11)
|
||||||
target_link_libraries(${exec_name} PRIVATE ${target_name})
|
target_link_libraries(${exec_name} PRIVATE ${target_name})
|
||||||
target_compile_options(${exec_name} PRIVATE ${warning_options})
|
target_compile_options(${exec_name} PRIVATE ${warning_options})
|
||||||
|
target_compile_options(${exec_name} PRIVATE -g)
|
||||||
# Clang has been fast to adopt dwarf 5, other tools (e.g. addr2line from binutils) have not
|
# Clang has been fast to adopt dwarf 5, other tools (e.g. addr2line from binutils) have not
|
||||||
check_cxx_compiler_flag("-gdwarf-4" HAS_DWARF4)
|
check_cxx_compiler_flag("-gdwarf-4" HAS_DWARF4)
|
||||||
if(HAS_DWARF4)
|
if(HAS_DWARF4)
|
||||||
@ -30,10 +31,12 @@ if(UNIX)
|
|||||||
add_executable(signal_demo signal_demo.cpp)
|
add_executable(signal_demo signal_demo.cpp)
|
||||||
target_compile_features(signal_demo PRIVATE cxx_std_11)
|
target_compile_features(signal_demo PRIVATE cxx_std_11)
|
||||||
target_link_libraries(signal_demo PRIVATE ${target_name})
|
target_link_libraries(signal_demo PRIVATE ${target_name})
|
||||||
|
target_compile_options(signal_demo PRIVATE -g)
|
||||||
|
|
||||||
add_executable(signal_tracer signal_tracer.cpp)
|
add_executable(signal_tracer signal_tracer.cpp)
|
||||||
target_compile_features(signal_tracer PRIVATE cxx_std_11)
|
target_compile_features(signal_tracer PRIVATE cxx_std_11)
|
||||||
target_link_libraries(signal_tracer PRIVATE ${target_name})
|
target_link_libraries(signal_tracer PRIVATE ${target_name})
|
||||||
|
target_compile_options(signal_tracer PRIVATE -g)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# primarily a workaround for github actions issue https://github.com/actions/runner-images/issues/8659
|
# primarily a workaround for github actions issue https://github.com/actions/runner-images/issues/8659
|
||||||
@ -61,5 +64,6 @@ if(NOT CPPTRACE_SKIP_UNIT)
|
|||||||
target_compile_features(unittest PRIVATE cxx_std_20)
|
target_compile_features(unittest PRIVATE cxx_std_20)
|
||||||
target_link_libraries(unittest PRIVATE ${target_name} GTest::gtest_main GTest::gmock_main)
|
target_link_libraries(unittest PRIVATE ${target_name} GTest::gtest_main GTest::gmock_main)
|
||||||
target_compile_options(unittest PRIVATE ${warning_options} $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-pedantic -Wno-attributes>)
|
target_compile_options(unittest PRIVATE ${warning_options} $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-pedantic -Wno-attributes>)
|
||||||
|
target_compile_options(unittest PRIVATE -g)
|
||||||
add_test(NAME unittest COMMAND unittest)
|
add_test(NAME unittest COMMAND unittest)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user