I have a CTestList.cmake file containing this function definition and call:
function(add_test_r testname )
add_test(
${testname} python executeRegressionTestCase.py ${testname}
)
endfunction(add_test_r)
add_test_r(Test01)
I need to support testing through CMake directly, cmake ..; make test
, and through CTest without running CMake first. When CMake builds the test
target and I run make test
, the function above executes fine. However, when I run the same file with CTest, ${testname}
is empty. Are function variables not supported in CTestList when running with CTest or is there something I'm missing?