Skip to content

Instantly share code, notes, and snippets.

@bearcage
Created May 27, 2017 20:17
Show Gist options
  • Select an option

  • Save bearcage/243edcc5870255baeb01625a1ddc0fbd to your computer and use it in GitHub Desktop.

Select an option

Save bearcage/243edcc5870255baeb01625a1ddc0fbd to your computer and use it in GitHub Desktop.
function(discover_catch_tests target)
execute_process(COMMAND "${target}" "--list-test-names-only"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
OUTPUT_VARIABLE test_dump
ERROR_QUIET)
string(REPLACE "\n" ";" test_list "${test_dump}")
set(DISCOVERED_TESTS ${test_list} PARENT_SCOPE)
endfunction()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment