Skip to content

Commit

Permalink
Generate dSYMs for test programs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Dec 6, 2023
1 parent 2ed9f82 commit 7b1477d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
python3 run-tests.py $<TARGET_FILE:integration> ${CMAKE_BUILD_TYPE} ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_STANDARD}
)

set(
dsym_targets
demo
integration
)

set(
unit_test_sources
tests/unit/constexpr_contexts.cpp
Expand All @@ -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 $<TARGET_FILE:${target}>
)
endforeach(target ${dsym_targets})
endif()
endif()

0 comments on commit 7b1477d

Please sign in to comment.