[CMake] ${CTEST_CONFIGURATION_TYPE} expanded to an empty string while running ctest

Brad King brad.king at kitware.com
Wed Jun 21 15:12:19 EDT 2006


Gaetan Lehmann wrote:
> 
> Hi,
> 
> I'm trying to run a different code some test with different path 
> depending of the configuration (debug, release, ...) with Xcode and 
> cmake 2.4.2
> 
> I have seen on the mailing list that ${CTEST_CONFIGURATION_TYPE} should 
> be expanded to the configuration type. However, it seem to be expanded 
> to an empty string.
> 
> ADD_TEST(mytest echo "testing \${CTEST_CONFIGURATION_TYPE}")
> 
> produce:
> 
> Start processing tests
> Test project
> Constructing a list of tests
> Done constructing a list of tests
> Changing directory into 
> /Users/glehmann/src/contrib-itk/WrapITK/build-xcode/Python/Tests
>   1/ 33 Testing mytest
> Test command: /bin/echo testing\
> testing
> -- Process completed
>    Passed
> 
> The following tests passed:
>         mytest
> 
> 100% tests passed, 0 tests failed out of 1
> 
> 
> What is the right way to use configuration type with tests ?

This is correct, but you actually have to specify a configuration type 
when running tests.  Try running the tests like this:

ctest -R mytest -C Debug

-Brad



More information about the CMake mailing list