[CMake] Specifying the 'make' you want with a ctest script

Wheeler, Frederick W (GE, Research) wheeler at crd.ge.com
Wed Sep 24 20:12:37 EDT 2008


CMake List:

Here is a snippet of a ctest script I'm using.

  ...
  CTEST_EMPTY_BINARY_DIRECTORY( "${CTEST_BINARY_DIRECTORY}" )
  FILE( WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
"${CTEST_INITIAL_CACHE}" )
  CTEST_CONFIGURE( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
  CTEST_READ_CUSTOM_FILES( "${CTEST_SOURCE_DIRECTORY}" )
  CTEST_BUILD( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
  CTEST_TEST( RETURN_VALUE res )
  ...

The problem I'm having is that during the CTEST_BUILD command, 'make'
(the default?)  seems to be used, instead of the
MAKECOMMAND:STRING=C:/cygwin/home/200006507/make -k that I put into
the initial CMakeCache.txt with the FILE( WRITE ... command.  Setting
MAKECOMMAND in the initial cache used to work for me with earlier
versions of ctest and the earlier style of ctest script.

My question: Is there some special CTEST_ variable that needs to be
set to the make I want to use?

Another option I guess I have is to wait for cygwin to upgrade make to
the newer version that works with the Makefiles produced by CMake.
I'm sure that will happen any day now.

Thanks,
Fred Wheeler


More information about the CMake mailing list