[CMake] CTest and devenv command line issues

Anton Deguet anton.deguet at jhu.edu
Tue Aug 8 18:25:39 EDT 2006


Brad,

Thank you for your reply.   I finally had a chance to try it and I must
admit that I only have a partial success to report.  The main issue I
have is that I am using a custom command (post build) to generate the
list of test cases used by CTest.  So, what happens is that within the
IDE/devenv, I need to have the paths set for my Dlls and Python
libraries.

My partial solution so far is to compile using devenv with /useenv and
then use a CTest script for the submission.  This seems to work:

@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
"C:\Program Files\CMake 2.4\bin\ctest.exe" -C Release -S script.cmake

This solution is only partial because ctest will not handle the
compilation and therefore will not report any compiler error to Dart.

Without the ctest script I could not submit.  With it I can now submit
but I still can't compile, i.e. it looks like the PATH I set using
SET(CTEST_ENVIRONMENT ...) is not passed properly to devenv ...  Any
thoughts?

Anton


On Tue, 2006-07-25 at 16:00 -0400, Brad King wrote:
> 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
-- 
Anton Deguet <anton.deguet at jhu.edu>
ERC CISST Johns Hopkins University


More information about the CMake mailing list