Here's the problem. I have a test that invokes an external program. So I have this in my CMakeLists.txt

ADD_TEST(ExampleTest exampleprogram a b c)

The problem is that exampleprogram requires the first parameter to be the name of an output file, and will exit with an error return code if that file already exists.

My 'naive' solution would be this:

ADD_TEST(ExampleTest rm -f a ; exampleprogram a b c)

which would essentially be a 2-command shell script. This does not work, and I tried a lot of different ways to get the test to generate a command that would remove a file, and then run the test.

Any suggestions? Thanks in advance!

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to