Skip to content

Instantly share code, notes, and snippets.

@redboltz
Created July 4, 2017 12:16
Show Gist options
  • Save redboltz/74545a726c65778e2c856f3d2e82065e to your computer and use it in GitHub Desktop.
Save redboltz/74545a726c65778e2c856f3d2e82065e to your computer and use it in GitHub Desktop.
ctest with arguments
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.12)
ENABLE_TESTING ()
STRING(REPLACE " " ";" CTEST_ARGS_LIST $ENV{CTEST_ARGS})
ADD_TEST(foo foo.sh ${CTEST_ARGS_LIST})
#!/bin/sh
echo arg1:$1 arg2:$2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment