Hi Folks, Now that I'm using CMake 3.2.2 to get the "pool = console" Ninja feature, I'm seeing this warning: CMake Warning (dev) at projects/compiler-rt/cmake/Modules/CompilerRTUtils.cmake:55 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Quoted variables like "HAVE_RPC_XDR_H" will no longer be dereferenced when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): projects/compiler-rt/lib/sanitizer_common/CMakeLists.txt:116 (append_have_file_definition) This warning is for project developers. Use -Wno-dev to suppress it. I don't want to suppress it, since the semantics of the expansion is different. Is anyone seeing this who knows what the best work around is? Or is it just a developer's message (as the warning implies) and future release versions will work around it automatically? Would be good to get some way that both pre and pos 3.2 can work correctly with the same code. cheers, --renato
On Fri, 15 May 2015 at 11:24 Renato Golin <renato.golin at linaro.org> wrote:> Now that I'm using CMake 3.2.2 to get the "pool = console" Ninja > feature, I'm seeing this warning: > > [...] > Quoted variables like "HAVE_RPC_XDR_H" will no longer be dereferenced > when > [...] > > I don't want to suppress it, since the semantics of the expansion is > different. Is anyone seeing this who knows what the best work around > is?The fix should be as simple as changing "if (NOT "${varname}")" to "if (NOT ${varname})" on that line.> Or is it just a developer's message (as the warning implies) and > future release versions will work around it automatically? >When it says "for project developers", it doesn't mean CMake developers, it means LLVM developers; that part of the warning is meant for end-users compiling at home. Stefanus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150515/8fd87972/attachment.html>
On 15 May 2015 at 17:04, Stefanus Du Toit <sdt at google.com> wrote:> The fix should be as simple as changing "if (NOT "${varname}")" to "if (NOT > ${varname})" on that line.Would that work on CMake 2.8, too? That's our current lowest version. cheers, --renato