From 7b1477dd63f6a96a233cbeddda2f2c153aab9f15 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:11:20 -0500 Subject: [PATCH] Generate dSYMs for test programs --- tests/CMakeLists.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 24833829..b166ac59 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -50,6 +50,12 @@ if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) python3 run-tests.py $ ${CMAKE_BUILD_TYPE} ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_STANDARD} ) + set( + dsym_targets + demo + integration + ) + set( unit_test_sources tests/unit/constexpr_contexts.cpp @@ -65,7 +71,18 @@ if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) add_executable(${test_name} ${test_file}) target_link_libraries(${test_name} libassert-lib) add_test(NAME ${test_name} COMMAND ${test_name}) + list(APPEND dsym_targets ${test_name}) endforeach(test_file ${unit_test_sources}) add_executable(basic tests/basic/basic_test.cpp) target_link_libraries(basic PRIVATE libassert-lib) + + if(APPLE) + foreach(target ${dsym_targets}) + add_custom_command( + TARGET ${target} + POST_BUILD + COMMAND dsymutil $ + ) + endforeach(target ${dsym_targets}) + endif() endif()