[CMake] scripting ctest

David Cole david.cole at kitware.com
Fri Nov 6 09:07:45 EST 2009


There is no value for ${PROJECT_NAME} in a ctest -S script unless you have
set it priot to the -- snip -- that you sent... So you are setting
CTEST_PROJECT_NAME to nothing.

And, since this is a new-style -S script, you should try using:
SET(ENV{CC} "cc")
SET(ENV{CXX} "CC")

instead of setting the old-style CTEST_ENVIRONMENT variable...


HTH,
David


On Fri, Nov 6, 2009 at 4:47 AM, <th.tom at gmx.de> wrote:

> Hi again,
>
> I am doing something wrong here, but what:
>
> -- snip script.cmake ---
>  SET ( CTEST_PROJECT_NAME ${PROJECT_NAME} )
>  SET ( CTEST_BINARY_DIRECTORY ${SOURCE_DIR}/build )
>  SET ( CTEST_SOURCE_DIRECTORY ${SOURCE_DIR} )
>
>  SET ( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
>
>  SET ( CTEST_ENVIRONMENT "CC=cc" "CXX=CC" )
>  SET ( CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE )
>
>  CTEST_START     ( Experimental )
>  CTEST_CONFIGURE ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
>  CTEST_BUILD     ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
>  CTEST_SUBMIT    ( RETURN_VALUE res )
> ------------------------
>
> The environment variables are ignored, and gcc is used instead of cc.
> Additional the binary directory is not cleaned.
>
> Is there something that I have to do extra?
>
> -tom
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091106/29e2c09d/attachment.htm>


More information about the CMake mailing list