[cmake-developers] [CMake 0015690]: ctest doing one more undesirable run

Mantis Bug Tracker mantis at public.kitware.com
Fri Aug 7 16:41:02 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15690 
====================================================================== 
Reported By:                Clinton Stimpson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15690
Category:                   CTest
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-08-07 16:41 EDT
Last Modified:              2015-08-07 16:41 EDT
====================================================================== 
Summary:                    ctest doing one more undesirable run
Description: 
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.

Steps to Reproduce: 
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()

Additional Information: 
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).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-08-07 16:41 Clinton StimpsonNew Issue                                    
======================================================================



More information about the cmake-developers mailing list