Re: [CMake] setup enviroment for all tests

2014-07-31 Thread Nils Gladitz
On 07/31/2014 01:21 AM, Leek, Jim wrote: I recently converted my project to configure with cmake, and am now trying to get the tests to run under ctest. I may be doing this completely incorrectly, so let me know if anything you see below looks like a bad idea. All my tests use a particular

Re: [CMake] setup enviroment for all tests

2014-07-31 Thread David Cole via CMake
CMake itself does this to include a file at ctest time that applies to *all* tests: set_directory_properties(PROPERTIES TEST_INCLUDE_FILE ${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake) It results in this line being generated in CTestTestfile.cmake at the very top of the file:

Re: [CMake] setup enviroment for all tests

2014-07-31 Thread Jim Leek
OK, the below suggestion did have one problem, but I was able to make it work. The problem, kind of hinted at in David Cole's answer, was that, since the file is run at test time, variables defined at configure time don't work. So, this did NOT work: added to top level CMakeLists.txt:

[CMake] setup enviroment for all tests

2014-07-30 Thread Leek, Jim
I recently converted my project to configure with cmake, and am now trying to get the tests to run under ctest. I may be doing this completely incorrectly, so let me know if anything you see below looks like a bad idea. All my tests use a particular program to check the output of the tests