[CMake] CMP0054 and CMake Modules

thoni56 thomas at junovagen.se
Mon Sep 21 04:24:41 EDT 2015


Aahh, I was looking at the trace and it only included "include":s so I
thought that offending IF was in cmake's own files since it pointed there.

But, you are saying that probably the culprit is a variable set before the
first include, right? (It was definitely not by intention a variable was as
having the empty name ;-).

And if I look at
/usr/share/cmake-3.3.1/Modules/CMakeParseImplicitLinkInfo.cmake:58 I should
probably see the variable (or one that expands to include it)?

/Thomas


Nils Gladitz-2 wrote
> On 09/21/2015 09:37 AM, thoni56 wrote:
>>    Quoted variables like "" will no longer be dereferenced when the
>> policy is
> 
> You apparently have a variable whose name is the empty string.
> 
> ...
> 
> Since most cmake provided modules have to work with both the old and new 
> behavior a common work around is e.g.
> 
> 	if("x${MYVAR}" STREQUAL "x")
> 
> This workaround however only works if by convention there are no 
> variables starting with a lower case x in their name.
> 
> I think by that same reasoning you should avoid defining variables whose 
> name is the empty string.
> 
> Nils
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake





--
View this message in context: http://cmake.3232098.n2.nabble.com/CMP0054-and-CMake-Modules-tp7590137p7591580.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list