[cmake-developers] CMP0065 warning not supressed when --trace used

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Jul 14 13:32:31 EDT 2016


Hi Chuck:

I am addressing this mostly to you because you are the author of
CMP0065 which has the special property that by default it does not
warn when the policy is not set.  However, I find it does warn when
--trace is set which I am fairly sure is a (minor) bug.

Please take a look at the attached CMakeLists.txt file
which is a self-contained simple test project that demonstrates
the described issue with CMP0065 and --trace.  For this project the policy is not
set because of

cmake_minimum_required(VERSION 3.3.2 FATAL_ERROR)

And indeed normal use of cmake (version 3.5.2) gives no warning for
CMP0065 as advertised by the CMP0065 documentation.

However, on my Linux platform (Debian Jessie with cmake-3.5.2 which I
built with the bootstrap method) if you use the cmake --trace option you do get the following
warning message (after a whole bunch of other messages from the
--trace option).

-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
   Policy CMP0065 is not set: Do not add flags to export symbols from
   executables without the ENABLE_EXPORTS target property.  Run "cmake
   --help-policy CMP0065" for policy details.  Use the cmake_policy command to
   set the policy and suppress this warning.

   For compatibility with older versions of CMake, additional flags may be
   added to export symbols on all executables regardless of thier
   ENABLE_EXPORTS property.
This warning is for project developers.  Use -Wno-dev to suppress it.

First there is an extremely minor but still irritating message content
bug here where you should change "thier" (in the third last line) to
"their".

More seriously, I am pretty sure that the --trace option should not
change warnings policy this way, i.e., this is a bug in --trace or a
bug in the way that CMP0065 implements the supression of the warning
by default.  If you have any difficulty confirming this issue with the
attached CMakeLists.txt and CMake-3.5.2 (or presumably later) please
get back to me.

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 --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160714/49a6b78c/attachment.txt>


More information about the cmake-developers mailing list