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