[CMake] Cmake variable indicating ctest dashboard build (likeDART_ROOT)

Ken Martin ken.martin at kitware.com
Tue Jul 31 15:12:50 EDT 2007


My Dart knowledge is a bit rusty, but I believe that DART_ROOT is set
regardless of if you are doing a build for a dashboard. Specifically it is
set by anything that includes Dart.cmake, was able to find dart, and has
BUILD_TESTING turned on (it is on by default). So the value will not change
between doing a manual build or one that is driven by the dashboard process
from what I can see. Now if only your dashboard machines have Dart installed
then it would effectively work since only on them would DART_ROOT be set. In
that case it is really more a test of if Dart is installed.
 
It sounds like you want to change the build (well configuration step really)
based on if it is a dashboard build or not. The general way to do that is by
setting the initial cache in the CTest script as you noted in your example. 
 
Hopefully that makes sense.

Thanks
Ken
 
Ken Martin PhD 
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971 
 


________________________________

	From: cmake-bounces+ken.martin=kitware.com at cmake.org
[mailto:cmake-bounces+ken.martin=kitware.com at cmake.org] On Behalf Of
Wheeler, Frederick W (GE, Research)
	Sent: Tuesday, July 31, 2007 12:53 PM
	To: cmake at cmake.org
	Subject: [CMake] Cmake variable indicating ctest dashboard build
(likeDART_ROOT)
	
	

	Cmake list: 

	In the VXL project we use the cmake variable DART_ROOT to determine
whether the build is being done for the dashboard.  But if ctest is used,
DART_ROOT is not set.  Is there a different variable that should be used for
this purpose that works for both the old tcl-Dart1 and new ctest?

	Here is a typical current VXL use of DART_ROOT ... 

	# Default the dashboard builds to "YES" so that 
	# we have some clients that try to compile vgui 
	IF( DART_ROOT ) 
	  OPTION( BUILD_VGUI "Build VGUI" "YES" ) 
	ELSE( DART_ROOT ) 
	  OPTION( BUILD_VGUI "Build VGUI" "NO" ) 
	ENDIF( DART_ROOT ) 

	. and I really just want to do the following in the right way ... 

	# Option to specify whether this is a build for the dashboard 
	#  - If Dart (TCL) is being used for the dashboard build, DART_ROOT 
	#    will be set. 
	#  - If CTest is being used for a dashboard build, set 
	#    BUILD_FOR_VXL_DASHBOARD to YES using SET (CTEST_INITIAL_CACHE
...) 
	#    in the CTest script (until we find a better method right here).

	IF( DART_ROOT ) 
	  OPTION( BUILD_FOR_VXL_DASHBOARD "Is this a build for the
dashboard?" YES ) 
	ELSE( DART_ROOT ) 
	  OPTION( BUILD_FOR_VXL_DASHBOARD "Is this a build for the
dashboard?" NO ) 
	ENDIF( DART_ROOT ) 


	Thanks, 
	Fred 




More information about the CMake mailing list