MantisBT - CMake
View Issue Details
0015690CMakeCTestpublic2015-08-07 16:412016-06-10 14:31
Clinton Stimpson 
Kitware Robot 
normalminorhave not tried
closedmoved 
 
 
0015690: ctest doing one more undesirable run
I call

ctest -VV -S my.ctest

and it goes through my script, then decides to do one more configure/build/test, which I don't want.
Use this ctest script:


set(CTEST_SOURCE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/src)
set(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/build)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_PROJECT_NAME "all")
set(CTEST_CONFIGURATION_TYPE "Release")
set(CTEST_COMMAND "ctest")

function(doit)
  ctest_start(Experimental)
  ctest_configure()
  ctest_build()
endfunction()

doit()
Notice how I'm using a function(). If I change to a macro(), then the problem goes away. But I don't want to do that.

A workaround is to add
set(CTEST_RUN_CURRENT_SCRIPT OFF)
at the bottom of my script (yuck).
No tags attached.
Issue History
2015-08-07 16:41Clinton StimpsonNew Issue
2015-08-10 08:33Brad KingNote Added: 0039259
2016-06-10 14:29Kitware RobotNote Added: 0042821
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039259)
Brad King   
2015-08-10 08:33   
This is left from legacy behavior when the ctest -S script mode would actually drive the dashboard itself and the script part was only for setting variables. Then we added the explicit command mode and distinguish it by the presence of one of the ctest_* commands (or something like that).
(0042821)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.