mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-08 00:23:47 +00:00
better ctest integration across the board
This commit is contained in:
@@ -38,6 +38,15 @@ target_link_libraries(test_graphid_recycle PRIVATE CUDA::cupti CUDA::cuda_driver
|
||||
|
||||
set(_all_targets repro test_corr_reuse test_graphid_recycle)
|
||||
|
||||
# ctest-related integration below
|
||||
# to run the binaries via ctest:
|
||||
# ctest --test-dir <cmake-build-dir> -R <binary-name> -C <build-config>
|
||||
|
||||
enable_testing()
|
||||
foreach(_target ${_all_targets})
|
||||
add_test(NAME ${_target} COMMAND ${_target})
|
||||
endforeach()
|
||||
|
||||
# On Windows, CUPTI's DLL must be on PATH at runtime.
|
||||
# Propagate the DLL directory to both the VS debugger and ctest.
|
||||
if(WIN32)
|
||||
@@ -45,11 +54,6 @@ if(WIN32)
|
||||
foreach(_target ${_all_targets})
|
||||
set_target_properties(${_target} PROPERTIES
|
||||
VS_DEBUGGER_ENVIRONMENT "PATH=${_cupti_dir};$ENV{PATH}")
|
||||
endforeach()
|
||||
|
||||
enable_testing()
|
||||
foreach(_target ${_all_targets})
|
||||
add_test(NAME ${_target} COMMAND ${_target})
|
||||
set_tests_properties(${_target} PROPERTIES
|
||||
ENVIRONMENT "PATH=${_cupti_dir};$ENV{PATH}")
|
||||
endforeach()
|
||||
|
||||
Reference in New Issue
Block a user