[CMake] CTest and devenv command line issues

William A. Hoffman billlist at nycap.rr.com
Tue Aug 8 20:22:13 EDT 2006


At 06:25 PM 8/8/2006, Anton Deguet wrote:
>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

You might want to look into ctest  --build-and-test.  We use it in cmake,
given a directory with a cmakelist file, it will run cmake on it, then compile
it, then run something.  You could run that as the first test that creates your
other tests maybe....

-Bill



More information about the CMake mailing list