Unfortunately, you&#39;ve stumbled across a hole in the implementation. It should work the way you think it should work. :-)<br><br>It&#39;s related to this bug:<br><a href="http://public.kitware.com/Bug/view.php?id=2336">http://public.kitware.com/Bug/view.php?id=2336</a><br>
<br>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...<br><br>
Something like:<br>set(ENV{CMAKE_CONFIG_TYPE} &quot;${CTEST_BUILD_CONFIGURATION}&quot;)<br><br>If that doesn&#39;t work, you may have to resort to calling ctest with -C AND setting CTEST_BUILD_CONFIGURATION for now.<br><br>
<br>HTH,<br>David<br><br><br><div class="gmail_quote">On Tue, Jul 7, 2009 at 6:46 PM, Clinton Stimpson <span dir="ltr">&lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have a ctest script with a<br>
set(CTEST_BUILD_CONFIGURATION &quot;Release&quot;)<br>
<br>
And in a CMakeLists.txt file I&#39;ve got an<br>
add_test(Foo ${CMAKE_CTEST_COMMAND}<br>
   -C \${CTEST_CONFIGURATION_TYPE}<br>
   --build-and-test  .... etc... )<br>
<br>
<br>
But when ctest_test() is called in my ctest script, CTEST_CONFIGURATION_TYPE is empty, which makes my test fail.<br>
Am I supposed to run ctest with the -C flag instead of trying to specify it in the script?<br>
If so, then what&#39;s the point of having CTEST_BUILD_CONFIGURATION?<br>
<br>
Clint<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>