[cmake-developers] Probable bug in message output from Modules/Platform/CYGWIN.cmake

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Apr 27 17:53:38 EDT 2015


PLplot currently uses

cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)

Yet one of the PLplot developers gets the following incorrect warning
message on Cygwin:

CMake Warning at /usr/share/cmake-3.1.2/Modules/Platform/CYGWIN.cmake:15 (message):
   CMake no longer defines WIN32 on Cygwin!

   (1) If you are just trying to build this project, ignore this warning or
   quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
   the CMake cache.  If later configuration or build errors occur then this
   project may have been written under the assumption that Cygwin is WIN32.
   In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.

   (2) If you are developing this project, add the line

     set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required

   at the top of your top-level CMakeLists.txt file or set the minimum
   required version of CMake to 2.8.4 or higher.  Then teach your project to
   build on Cygwin without WIN32.
Call Stack (most recent call first):
   /usr/share/cmake-3.1.2/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
   CMakeLists.txt:1 (project)

I have stared at the logic in Modules/Platform/CYGWIN.cmake to try to
figure out why this message is occurring but cannot figure it out.

The

if("${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS "2.8.3.20101214")

command should not succeed (since our minimum CMake version is 3.0.2)
so __USE_CMAKE_LEGACY_CYGWIN_WIN32 should not be defined
which implies the code block that generates the above message should
never be entered.

So I am pretty sure there is a bug in the Modules/Platform/CYGWIN.cmake,
but I cannot figure it out.  Note the net result of this is the
above message is being generated in contradiction to what it says
which is it will not be generated if the minimum version > 2.8.4.

Anybody here got a clue about what is going on?

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-developers mailing list