On 11/01/2012 11:45 AM, Stephen Kelly wrote:
> Ok, I've added a test for that, but as that test uses CMAKE_COMMAND too, 
> with makefile generators, the result will be 0000 each time.

Okay, now I see what you meant before.  Sorry.

I think just this will be sufficient (untested):

diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 8c67625..7c67c5f 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -37,6 +37,7 @@

 macro(add_RunCMake_test test)
   add_test(RunCMake.${test} ${CMAKE_CMAKE_COMMAND}
+    -DCMAKE_BUILD_TYPE=\${CTEST_CONFIGURATION_TYPE}
     -DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}
     -DRunCMake_GENERATOR=${CMAKE_TEST_GENERATOR}
     -DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test}

The CMAKE_BUILD_TYPE value will ensure that single-config generators
get the tested configuration and will be ignored by multi-config
generators which do several configs anyway.

-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

Reply via email to