On 05/09/2013 09:10 AM, Rolf Eike Beer wrote:
> A bunch of tests on the dashboard currently fail because the sub-ctest they
> start doesn't know about it's configuration. I can go the easy road and just
> force that to Debug, but that doesn't seem right. Does anybody have an idea
> how to properly fix this?
The -C \${CTEST_CONFIGURATION_TYPE} trick is useful only in the
old-style add_test signature. The modern add_test(NAME) signature
will escape the literal "${CTEST_CONFIGURATION_TYPE}" argument but
instead you can use the $<CONFIGURATION> generator expression:
diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt
b/Tests/CTestTestMemcheck/CMakeLists.txt
index e9d1f43..b0ca65e 100644
--- a/Tests/CTestTestMemcheck/CMakeLists.txt
+++ b/Tests/CTestTestMemcheck/CMakeLists.txt
@@ -49,7 +49,7 @@ function(gen_mc_test_internal NAME CHECKER)
endforeach()
add_test(NAME CTestTestMemcheck${NAME}
COMMAND ${CMAKE_CTEST_COMMAND}
- -C \${CTEST_CONFIGURATION_TYPE}
+ -C $<CONFIGURATION>
-S "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/test.cmake" -V
--output-log "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/testOutput.log"
${ARGN}
-Brad
--
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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers