[cmake-developers] Problems with external language support when there is a blank in CMAKE_MODULE_PATH
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Mon May 22 15:46:28 EDT 2017
I have been systematically testing PLplot builds for any issues with
blanks in the prefix of the source, build, and install trees, and
generally all is well under these test conditions. However, we do
have two remaining issues which are that our (external) language
support for both Ada and D fails if there is a blank in the
source tree prefix.
Our Ada language support comes with a simple "Hello, world" test
project to test for language support issues for that language, and
I have attached a tarball of that simple project so you can
easily replicate this "blank in source tree" issue for yourself
for at least that language.
This test project works fine if the tarball is unpacked in a location
without blanks in the full pathname, but fails when there is
a blank in that unpacked pathname.
The initial error message in that latter case is
CMake Error: Could not find cmake module file: CMakeAdaInformation.cmake
Such external language support (e.g., in this Ada case) must
necessarily set CMAKE_MODULE_PATH to help CMake find the external
language support files such as CMakeAdaInformation.cmake, and that
full pathname necessarily contains a blank when the tarball is
unpacked in a location with a blank in the full pathname.
I thought the trouble might be that CMake just did not accept blanks
in the full pathname of _any_ language support files, but I
tested that case (by moving a previous CMake install location
to one with a blank in its full pathname), but a simple project
consisting of
# Test C language support
cmake_minimum_required(VERSION 3.8.1 FATAL_ERROR)
project(test_c C)
had no issues under those conditions, i.e., with
the C language support files in the <prefix with
blank>/share/share/cmake-3.8/Modules/ directory tree.
So my guess is the measures that have been used so that a blank in the
fullpath name works fine for CMake language support files that are
installed by CMake have not been extended to the case where
CMAKE_MODULE_PATH must be used to find the language support files.
If that is the issue, a fix would be appreciated.
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
__________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_ada.tar.gz
Type: application/x-gtar-compressed
Size: 19712 bytes
Desc: Simple test case for Ada language support
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170522/40ce7372/attachment-0001.tgz>
More information about the cmake-developers
mailing list