[CMake] 2.8.4 order of tests

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Mar 19 16:37:36 EDT 2011


On 2011-02-21 12:42-0500 David Cole wrote:

> This should be fixed already in CMake's 'next' branch. If you can try
> a nightly installer, or build yourself from 'next', let me know if
> there is still any problem.
>
> Fix will be in 2.8.5 when it comes out in a few months.

I got bitten by this bug today in 2.8.4 so I am glad Allen found it
earlier, and it will be fixed in 2.8.5.

My own use case is I don't particularly care about the order of the tests except that one
of them is dependent on most of the rest as I discovered when the
tests were run in an unusual order with CMake-2.8.4.  Running the set_tests_properties
command according to
http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_test:DEPENDS
works around the issue and is probably a good idea in general when one
test depends on others.

Note, however, that although most PLplot users are presumably using
cmake-2.8.x, PLplot users are still allowed to use cmake-2.6.4 (and
that will continue a bit longer). Thus, I had to surround the
set_tests_properties command with this CMake version check;

if(CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 8)

because DEPENDS does not exist in cmake-2.6.x as a test property
according to the cmake-2.6.x documentation.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list