diff options
Diffstat (limited to '')
-rw-r--r-- | test/CMakeLists.txt | 8 | ||||
-rw-r--r-- | test/unit_tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | utils/CMakeLists.txt | 4 |
3 files changed, 4 insertions, 12 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d429bce..137936a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,18 +5,14 @@ target_include_directories(test_lib PUBLIC .) target_compile_definitions(test_lib PRIVATE TEST_LIB_EXPORTS) install(TARGETS test_lib RUNTIME DESTINATION bin/test) -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - install(FILES "$<TARGET_PDB_FILE:test_lib>" DESTINATION bin/test OPTIONAL) -endif() +install_pdbs(TARGETS test_lib DESTINATION bin/test) add_executable(call_stack call_stack.cpp) target_link_libraries(call_stack PRIVATE test_lib) target_link_libraries(call_stack PRIVATE Boost::nowide) install(TARGETS call_stack RUNTIME DESTINATION bin/test) -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - install(FILES "$<TARGET_PDB_FILE:call_stack>" DESTINATION bin/test OPTIONAL) -endif() +install_pdbs(TARGETS call_stack DESTINATION bin/test) add_test(NAME call_stack COMMAND call_stack) diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index ae43fbb..135087b 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -5,9 +5,7 @@ target_link_libraries(unit_tests PRIVATE pdb_repo test_lib) target_link_libraries(unit_tests PRIVATE Boost::disable_autolinking Boost::filesystem Boost::nowide Boost::unit_test_framework) install(TARGETS unit_tests RUNTIME DESTINATION bin/test) -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - install(FILES "$<TARGET_PDB_FILE:unit_tests>" DESTINATION bin/test OPTIONAL) -endif() +install_pdbs(TARGETS unit_tests DESTINATION bin/test) if(MSVC) # Set the working directory so that the unit_tests binary can find the diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 712a9e8..6f469a8 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -5,9 +5,7 @@ function(add_util name src) target_link_libraries("${name}" PRIVATE pdb_repo) target_link_libraries("${name}" PRIVATE Boost::disable_autolinking Boost::filesystem Boost::nowide Boost::program_options) install(TARGETS "${name}" RUNTIME DESTINATION bin) - if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - install(FILES "$<TARGET_PDB_FILE:${name}>" DESTINATION bin OPTIONAL) - endif() + install_pdbs(TARGETS "${name}" DESTINATION bin) endfunction() add_util(enum_symbols enum_symbols.cpp command_line.hpp pdb_descr.hpp) |