[CMake] CTest and devenv command line issues

Brad King brad.king at kitware.com
Tue Jul 25 16:00:28 EDT 2006


Anton Deguet wrote:
> Hello,
> 
> I am trying to setup a couple of nightly builds on a single Windows box.
> Since the build requires DLLs (to test our __declspec and Python
> wrappers), I have been trying to use the MSVC devenv command line
> with /useenv to set the DLL and Python search paths per build.  I have
> something almost working but I am stuck whenever I try to submit to
> Dart.  Here is what works (in a small batch script):
> 
> @rem Go to the build directory
> c:
> cd "C:\users\anton\dart-build\msvc7.1-dynamic-IDE\build"
> 
> @rem Set the env. variables.
> call cisstvsvars.bat
> call cisstvars.bat Release
> 
> @rem Clean and build
> devenv /useenv /clean Release /project ALL_BUILD
> devenv /useenv /build Release /project ALL_BUILD
> devenv /useenv /build Release /project RUN_TESTS
> 
> At that point, my test programs can find the DLLs and run successfully
> but, as expected, nothing gets submitted to my Dart2 dashboard. 
> 
> The following two won't work:
> devenv /useenv /build Release /project Nightly
> "C:\Program Files\CMake 2.4\bin\ctest.exe" -C Release -D Nightly
> 
> The error message is that the DLLs are not found.  I looks like at one
> point my environment variables have been dropped.
> 
> Any clue?  I am using CMake 2.4.2.

This doesn't work because building the Nightly target just runs another
ctest that constructs its own devenv command line to drive the build and
doesn't add the /useenv option.

CTest is designed to drive dashboard submissions using "ctest -S"
scripts.  See here for an example:

http://www.cmake.org/Testing/Sites/dash4.kitware/Win32-bcc5.8/20060725-1514-Experimental/Notes.html

You can set environment variables in the script:

SET(ENV{VAR1} "value1")
SET(ENV{VAR2} "value2")

-Brad


More information about the CMake mailing list