[CMake] Found the cause - was: Re: Include path Tcl under Cygwin

Arjen Markus arjen.markus at deltares.nl
Fri Jul 5 03:48:46 EDT 2013


On Thu, 4 Jul 2013 02:22:22 -0700 (PDT)
  "Alan W. Irwin" <irwin at beluga.phys.uvic.ca> wrote:

> 
> In a perfect world (assuming there is a well understood 
>set of
> standard locations for Cygwin system files, that CMake 
>knows about
> those when you are running on the Cygwin platform, _and_ 
>that CMake
> searches those locations before it searches the "raw" 
>Windows system
> locations) you would be correct. 
...
> And in my particular case (lots of packages that I want 
>to use that
> are often not installed in standard system locations) I 
>use
> CMAKE_INCLUDE_PATH, CMAKE_LIBRARY_PATH, and PATH 
>extensively to give
> CMake some guidance for where it finds software.
> 

Well, it took me some time o realise what was the 
difference
between my running CMake for the PLplot package and 
Marco's,
but when I tried it with a minimal build set-up:

set(PACKAGE testcygwin)
include(FindTCL)

I found that in this case it was finding the Tcl include
files in the directory /usr/include. So I thought there 
was
something odd going on in the PLplot set-up. Not quite
impossible, because PLplot takes care of many programming
languages, graphical options and libraries.

But then I realised that I use the option 
CMAKE_LEGACY_CYGWIN_WIN32=ON (in a shell script, as I am
too lazy to type the full command each time, but also to
ensure I can reproduce my build sessions).

The reason for using this option is that PLplot does use
the WIN32 variable for several Windows-specific aspects.
Some of them may not be important in the case of Cygwin
but others are (like building the wingcc device driver).

When I used that option on my minimal project, it indeed
found the Tcl include files in c:\tcl\include.

Since CMake under Cygwin is consistently finding the
Cygwin versions of all other Tcl-related things, I 
consider
this a bug related to this variable.

The bug is somewhere in the FIND_PATH command - the 
correct
path /usr/include is not contained in the hints that are
passed in the FindTCL module, so it digs that up all by
itself.

Regards,

Arjen

 

DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail.






More information about the CMake mailing list