[CMake] Some minor issues for 2.6.0-RC-8

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Apr 18 12:51:15 EDT 2008


On 2008-04-18 10:35-0400 Bill Hoffman wrote:

> Alan W. Irwin wrote:
>> 
>> (2) In CMP0003 OLD mode, the -pthread linker option triggers the warning.
>> That is obviously incorrect, and only a list of actual libraries 
>> (specified
>> only by -l options?) should trigger the warning.
> I will look at the -pthread case, since it can not depend on a -L.

Thanks.  However, I assume -pthread is just one example of many
compiler/linker options that have nothing to do with library location so I
suggest it might be easier to use a whitelist approach (-l, etc. accepted)
rather than a blacklist (-pthread, etc. rejected) approach.

>
>> 
>> (3) There is a "sequential" problem with these warnings so only the first
>> one encountered is mentioned.  Please go back to the old (CVS) method 
>> where
>> (IIRC) a complete list of CMP0003 warnings was generated.  It's a 
>> completely
>> self-explanatory warning message so users should not complain if they
>> encounter more than one of these messages.
>> 
> It was too verbose, a project like paraview produced hundreds of warnings, 
> and in 99% of the cases, making CMP0003 to NEW is the fix that needs to be 
> done.   The volume of output was confusing.  And still the message is 
> confusing to people.
>

I sympathize with your concern over verbose warnings.  However, if you stick
with mentioning just the first instance, then the conscientious package
developer sets CMP0003 to NEW after realizing it shouldn't make any difference
for that instance, then gets killed for the unmentioned hundredth instance
making debugging of the resulting linking problem confusing.

One idea would be to reduce the warning message to its essence for each
instance.  Just give what library/executable is affected, and what linking
options are causing the warning.

Then at the end (assuming there is one or more CMP0003 warnings) you give
the boilerplate about the options for dealing with the issues given by each
instance.  This rearrangement should save you at least a factor of two in
the volume of the CMP0003 warnings since you are not repeating the
boilerplate about what to do for the issue for each instance.

You could also have an option for shortening the instance warning down to
something like the current first line:

CMP0003 warning at bindings/wxwidgets/CMakeLists.txt:49 (add_library):

This short form (with full boilerplate explanation at the end) would save
another factor of 15 or so for a total saving of a factor of 30.  You could
even make this short form the default.  I would be happy so long as there is
a verbose warning form option available that gives me the linking option
details about each instance warning so I can properly evaluate the affect
for each different instance of adopting NEW policy for CMP0003.

Bill, I know at this stage you are probably sorry you had any CMP0003
warnings at all, but I want to thank you for making this effort since the
information in these warning messages is quite helpful.

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); 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
__________________________


More information about the CMake mailing list