Hi Alan
You may be right.
I tried commenting out the offending regex replace, which meant cmake finished 
with no issues. But, when I tried to compile I found I had a similar problem 
with header files. I couldn't actually find the offending code that is causing 
that problem. I tried adding some quotes, but that didn't seem to help.

So whatever workload you thought it was, it is actually double!

Would it be relatively straightforward to add a check, so if the user supplies 
an install or library/header path that contains " -" then we error out at that 
point? This way if anyone else hits this problem it would be very clear to the 
user what the problem is and how to fix it.

I presume we can't check each library individually - or it would be easy to 
fix. But I am setting cmake_install_prefix to a path that is bad, so maybe that 
could be checked. I think there are other variables too. Link_directories and 
include_directories, any more?

I'll set a workaround up on my computer by symlinking my usr directory from 
c:\usr or something. But it's a work computer and I'll need someone with admin 
rights to sort it for me next week.

Phil

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Alan W. Irwin <alan.w.irwin1...@gmail.com>
Sent: Saturday, July 13, 2019 6:42:20 AM
To: Phil Rosenberg
Cc: PLplot development list
Subject: Re: CMake problem with hyphen in path

On 2019-07-13 00:35+0100 Phil Rosenberg wrote:

> There are no .pc files. I'm building on native windows with visual
> studio (not with Cygwin or MSYS2) so there is no pkg-config. All
> libraries get found with the findXXX.cmake modules. In this case it is
> shapelib and wxwidgets libraries.
>
> On windows CMake basically hunts in certain locations for the libs and
> headers. In this case it finds shapelib by checking in my
> CMAKE_INSTALL_PREFIX and it finds wxWidgets via the WXWIN environment
> variable.

[...]
> Output
> (original _link_flags_list) = debug;C:/Users/earpros/OneDrive -
> University of 
> Leeds/Documents/usr/src/wxWidgets-3.0.4/lib/vc_x64_lib/wxbase30ud.lib;

[...]

> (post regex replace _link_flags_list) =
> debug;C:/Users/earpros/OneDrive;- University of
> Leeds/Documents/usr/src/wxWidgets-3.0.4/lib/vc_x64_lib/wxbase30ud.lib;

[...]

Hi Phil:

Thanks for the above detailed information which contradicted some of
my assumptions (natch).

However, I am frankly beginning to get cold feet about working much
further on this topic since from my Linux test of the case where
external libraries have blanks and hyphens in their installation
prefixes, there are a huge bunch of issues we would have to deal with
before that case worked, i.e., it would be a lot of work for little
real gain.

For example, my understanding is Windows installers typically give you
a choice of any installation prefix you want.  So wouldn't it be a lot
easier to ask our Windows users to be careful of that choice, i.e.,
pick installation prefixes without blanks or hyphens?  For example,
MSYS2 allows users to choose any installation prefix they like.  And
I think they even recommend not choosing an installation prefix with
spaces because of all the trouble that causes with free software.

Alan
__________________________
Alan W. Irwin

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.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
__________________________
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to