[CMake] Running two executables sequentially in a test
David Doria
daviddoria at gmail.com
Mon May 2 13:41:49 EDT 2011
On Mon, May 2, 2011 at 1:31 PM, David Cole <david.cole at kitware.com> 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
function to the test:
cmake_minimum_required(VERSION 2.6)
PROJECT(Test)
ENABLE_TESTING()
ADD_EXECUTABLE(Test1 Test1.cxx)
ADD_EXECUTABLE(Test2 Test2.cxx)
function(RunTest x y)
execute_process(x)
execute_process(y)
endfunction()
add_test(MyTest RunTest(Test1 Test2))
but I get the error:
Unable to find executable: RunTest
This must not be what you mean by "a script"?
David
More information about the CMake
mailing list