[CMake] MSYS2 broken CMAKE_PREFIX_PATH

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Feb 13 14:29:43 EST 2018


On 2018-02-13 15:22+0100 Mario Emmenlauer wrote:

> I'm 99% certain that this variable [the CMAKE_PREFIX_PATH
environment variable] is not defined, because I build
> from a standard Cygwin shell started from a gitlab runner. But there
> might be another piece of evidence that can help us further. When I
> build as outlined above (here for reference):
>
>    /mingw64/bin/cmake /d/tmp/sources \
>        -DCMAKE_PREFIX_PATH="/d/dest/thirdparty;/d/dest/binaries" && \
>    make && make install
>
> then the find_xxx() commands will work, but the cmake package
> configurations fail. To get them also to work, I can switch to
> Windows path styles:
>
>    /mingw64/bin/cmake /d/tmp/sources \
>        -DCMAKE_PREFIX_PATH="D:\\dest\\thirdparty;D:\\dest\\binaries" && \
>    make && make install
>
> then *everything* will work. So this should clarify that my POSIX path
> was not automatically translated before, otherwise both invocations
> would be identical, and the cmake package configurations should still
> fail.
>
> PS: Note that the source directory is *still* in POSIX path notation :-)

Hi Mario:

My understanding is that POSIX-style CMAKE PATH variables must be
colon-delimited.  So what does your CMakeCache.txt file say about
CMAKE_PREFIX_PATH with the semicolon delimiter you used above in your
first (POSIX) variant, and just as an experiment what happens with
that cache file and also your results with that first version if you
change the semicolon to a colon, i.e.,

     /mingw64/bin/cmake /d/tmp/sources \
         -DCMAKE_PREFIX_PATH="/d/dest/thirdparty:/d/dest/binaries" && \
     make && make install

?

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