[CMake] scripting ctest

th.tom at gmx.de th.tom at gmx.de
Mon Nov 9 04:28:03 EST 2009


Hi David,

thanks for the clarification. I set ${PROJECT_NAME} and ${SOURCE_DIR} to the appropriate name, but it changes from script to script (there is one script for every packet I create, so I only showed the code, that is used by all projects.) 

I am actually not working full time on this job any more, so I will try that, as fast as I am back there.

But thanks again!

-tom

> 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
> >


More information about the CMake mailing list