Re: [CMake] Running two executables sequentially in a test

2011-05-03 Thread Michael Wild
No, this is the documentation. You should read it. And then, for examples, take a look at the many open-source CMake-based projects, such as CMake itself, ParaView, KDE, FreeFOAM, Compiz, Slicer, etc. Looking "harder" usually involves using Google/Bing/Yahoo/... You have to understand that everybo

Re: [CMake] Running two executables sequentially in a test

2011-05-03 Thread J.S. van Bethlehem
Hej! I'm so sorry to say, but on that page is not a single example... Jakob execute_process requires the COMMAND keyword. http://cmake.org/cmake/help/cmake-2-8-docs.html#command:execute_process I think you should start looking around a little harder for some examples and documentation

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Cole
execute_process requires the COMMAND keyword. http://cmake.org/cmake/help/cmake-2-8-docs.html#command:execute_process I think you should start looking around a little harder for some examples and documentation before asking more about "how do I run a cmake script" on this list. Thanks, David

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread Tyler
Your syntax is wrong: http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:execute_process execute_process (COMMAND ${command1} ...) tyler On Mon, May 2, 2011 at 11:50 AM, David Doria wrote: > On Mon, May 2, 2011 at 2:27 PM, Tyler wrote: >> You could use -D flags (cmake -Dvar=value -P

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Doria
On Mon, May 2, 2011 at 2:27 PM, Tyler wrote: > You could use -D flags (cmake -Dvar=value -P script.cmake). That seems reasonable. I tried it: CMakeLists.txt - cmake_minimum_required(VERSION 2.6) PROJECT(Test) ENABLE_TESTING() ADD_EXECUTABLE(Test1 Test1.cxx) ADD_EXECUTABLE(Test2 Tes

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread Tyler
You could use -D flags (cmake -Dvar=value -P script.cmake). On Mon, May 2, 2011 at 11:07 AM, David Doria wrote: > On Mon, May 2, 2011 at 1:57 PM, David Cole wrote: >> script.cmake: >> execute_process(x) >> execute_process(y) >> >> CMakeLists.txt: >> add_test(NAME MyTest COMMAND ${CMAKE_COMMAND}

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Doria
On Mon, May 2, 2011 at 1:57 PM, David Cole wrote: > script.cmake: > execute_process(x) > execute_process(y) > > CMakeLists.txt: > add_test(NAME MyTest COMMAND ${CMAKE_COMMAND} -P > ${CMAKE_CURRENT_SOURCE_DIR}/script.cmake) > > Or, configure the script into the build tree if you need variable value

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Cole
script.cmake: execute_process(x) execute_process(y) CMakeLists.txt: add_test(NAME MyTest COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/script.cmake) Or, configure the script into the build tree if you need variable values from the CMakeLists.txt file and then reference the configured co

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Doria
On Mon, May 2, 2011 at 1:31 PM, David Cole wrote: > If it's supposed to be "one test" from ctest's point of view, you should > write a script that makes 2 execute_process calls, and run the script as the > add_test command. I tried to write a function that runs to executables, and add that functi

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread David Cole
If it's supposed to be "one test" from ctest's point of view, you should write a script that makes 2 execute_process calls, and run the script as the add_test command. On Mon, May 2, 2011 at 1:25 PM, Tyler wrote: > I believe tests can have dependencies. Failing that, you can use the > COST prop

Re: [CMake] Running two executables sequentially in a test

2011-05-02 Thread Tyler
I believe tests can have dependencies. Failing that, you can use the COST property to control test execution order. hth, tyler On Mon, May 2, 2011 at 10:18 AM, David Doria wrote: > I am trying to run an executable that produces an output image, then > compare this image to a baseline using a sep

[CMake] Running two executables sequentially in a test

2011-05-02 Thread David Doria
I am trying to run an executable that produces an output image, then compare this image to a baseline using a separate Compare executable. Is it possible to do this in a single add_test command? I tried separating the two executables with a semicolon, but that doesn't seem to work. add_executable