On 02/07/2014 05:19 PM, Steve Wilson wrote: > On Feb 7, 2014, at 3:01 PM, Brad King wrote: >> -DCMAKE_BUILD_TYPE=\${CTEST_CONFIGURATION_TYPE} > > I have tried adding that to my test call (--build-options) but it doesn't > seem to make any difference.
Oops, I picked the wrong line for an example. We need to pass the test configuration to the invocation of ctest --build-and-test. In your example change: add_test(CustomCommand.CONFIG ${CMAKE_CTEST_COMMAND} --build-and-test ... ) to: add_test(CustomCommand.CONFIG ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} --build-and-test ... ) That will ensure that the test project builds as the tested config. -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