Revert "Fix -g on msvc"

This reverts commit 51551ab741.
This commit is contained in:
Jeremy Rifkin 2024-08-18 00:55:49 -05:00
parent 51551ab741
commit df1d78d1eb
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4

View File

@ -7,17 +7,11 @@ set(
${warning_options} $<$<CXX_COMPILER_ID:GNU>:-Wno-infinite-recursion>
)
set(
debug
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-g>
$<$<CXX_COMPILER_ID:MSVC>:/DEBUG>
)
macro(add_test_dependencies exec_name)
target_compile_features(${exec_name} PRIVATE cxx_std_11)
target_link_libraries(${exec_name} PRIVATE ${target_name})
target_compile_options(${exec_name} PRIVATE ${warning_options})
target_compile_options(${exec_name} PRIVATE ${debug})
target_compile_options(${exec_name} PRIVATE -g)
if(CPPTRACE_BUILD_TESTING_SPLIT_DWARF)
target_compile_options(${exec_name} PRIVATE -gsplit-dwarf)
endif()
@ -48,7 +42,7 @@ if(UNIX)
add_executable(signal_demo signal_demo.cpp)
target_compile_features(signal_demo PRIVATE cxx_std_11)
target_link_libraries(signal_demo PRIVATE ${target_name})
target_compile_options(signal_demo PRIVATE ${debug})
target_compile_options(signal_demo PRIVATE -g)
if(CPPTRACE_BUILD_TESTING_SPLIT_DWARF)
target_compile_options(signal_demo PRIVATE -gsplit-dwarf)
endif()
@ -59,7 +53,7 @@ if(UNIX)
add_executable(signal_tracer signal_tracer.cpp)
target_compile_features(signal_tracer PRIVATE cxx_std_11)
target_link_libraries(signal_tracer PRIVATE ${target_name})
target_compile_options(signal_tracer PRIVATE ${debug})
target_compile_options(signal_tracer PRIVATE -g)
endif()
# primarily a workaround for github actions issue https://github.com/actions/runner-images/issues/8659
@ -83,12 +77,11 @@ if(NOT CPPTRACE_SKIP_UNIT)
unit/raw_trace.cpp
unit/object_trace.cpp
unit/stacktrace.cpp
unit/from_current.cpp
)
target_compile_features(unittest PRIVATE cxx_std_20)
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 ${debug})
target_compile_options(unittest PRIVATE -g)
if(CPPTRACE_BUILD_TESTING_SPLIT_DWARF)
target_compile_options(unittest PRIVATE -gsplit-dwarf)
endif()