Unfortunately, you've stumbled across a hole in the implementation. It should work the way you think it should work. :-)
It's related to this bug: http://public.kitware.com/Bug/view.php?id=2336 As noted in that bug report, you may be able to work around this by setting the env var CMAKE_CONFIG_TYPE. It should be unnecessary, but might get you working today before a real bug fix is made for that bug... Something like: set(ENV{CMAKE_CONFIG_TYPE} "${CTEST_BUILD_CONFIGURATION}") If that doesn't work, you may have to resort to calling ctest with -C AND setting CTEST_BUILD_CONFIGURATION for now. HTH, David On Tue, Jul 7, 2009 at 6:46 PM, Clinton Stimpson <clin...@elemtech.com>wrote: > I have a ctest script with a > set(CTEST_BUILD_CONFIGURATION "Release") > > And in a CMakeLists.txt file I've got an > add_test(Foo ${CMAKE_CTEST_COMMAND} > -C \${CTEST_CONFIGURATION_TYPE} > --build-and-test .... etc... ) > > > But when ctest_test() is called in my ctest script, > CTEST_CONFIGURATION_TYPE is empty, which makes my test fail. > Am I supposed to run ctest with the -C flag instead of trying to specify it > in the script? > If so, then what's the point of having CTEST_BUILD_CONFIGURATION? > > Clint > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake