[CMake] Running ctest tests from the test source directory
Ateljevich, Eli
eli at water.ca.gov
Tue Jul 10 10:47:12 EDT 2012
Thanks. Embarrassed, but happy.
-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Rolf Eike Beer
Sent: Monday, July 09, 2012 11:52 PM
To: cmake at cmake.org
Subject: Re: [CMake] Running ctest tests from the test source directory
Ateljevich, Eli wrote:
> Hi all,
> I am doing an out-of-source build in a directory called /build. I have
> a test directory /examples that has some input to be run with the
> projects main driver:
>
> /proj
> /build
> /bin
> driver.exe
> /example1
> /example2
> /example
> /example1
> ...some files
>
> The project is a computationally expensive numerical model with large
> data, so if at all possible I would like to avoid copying files. The
> input names are hardwired, so the executable has to be run from a
> directory where the data exist. Is there a best way to switch this so
> that the program runs in the /example/example1 directory instead of /build/example1?
cmake --help-command add_test
add_test(NAME <name> [CONFIGURATIONS [Debug|Release|...]]
[WORKING_DIRECTORY dir]
COMMAND <command> [arg1 [arg2 ...]])
Eike
--
More information about the CMake
mailing list