[CMake] lapack-3.4.1-cmake testing error

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat May 19 12:33:39 EDT 2012


On 2012-05-19 15:24+0100 luxInteg wrote:

> Greetings,
>
> I am trying to compile  lapack -3.4.1 with cmake.
> lapack-3.4.1/TESTING/CMakeLists.txt  has these lines at the end:-
>
> #----------------
> execute_process(COMMAND ${CMAKE_COMMAND} -E copy
> ${LAPACK_SOURCE_DIR}/lapack_testing.py ${LAPACK_BINARY_DIR})
> add_test(
>  NAME LAPACK_Test_Summary
>  WORKING_DIRECTORY ${LAPACK_BINARY_DIR}
>  COMMAND ${PYTHON_EXECUTABLE} "lapack_testing.py"
> )
> #-----------------------------
>
> running cmake ends like so:-
> ---------------------------
>
> CMake Error at TESTING/CMakeLists.txt:313 (add_test):
>  add_test given unknown argument:
>    WORKING_DIRECTORY
> -- Configuring incomplete, errors occurred!
> --------------------------
>
> I dont want to disable the tests so advice would be appreciated.

The ideal place to ask this question would be the lapack development
list rather than the CMake list, but, nevertheless, I think I can help
you out.

According to the appropriate man pages, the WORKING_DIRECTORY option
was added to the add_test command somewhere between cmake-2.8.2 and
cmake-2.8.7. So, as you found out, the lapack build system just doesn't
work properly for old cmake versions.

The normal way to avoid such issues is for the lapack developers to
update the cmake_minimum_required command for their build system so
the user is told up front exactly the minimum cmake version that can
be used.

Meanwhile, you can work around this bug in the lapack build system by using 
a later version of cmake (e.g., cmake-2.8.7) that does honor
the WORKING DIRECTORY option for the add_test command.

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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