Warning in GNUInstallDirs.cmake:249
A subproject that I'm including is using GNUInstallDirs (include(GNUInstallDirs)
). If I set a custom CMAKE_INSTALL_PREFIX
, GNUInstallDirs greets me with this warning:
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.10/Modules/GNUInstallDirs.cmake:249 (elseif):
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 "lib" 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):
3rdparty/pybind11/CMakeLists.txt:75 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
I think the offending line in GNUInstallDirs
seems to be elseif(DEFINED __LAST_LIBDIR_DEFAULT
. It definitely looks like it's coming from the GNUInstallDirs
module, not from pybind11, since all pybind11 does is include(GNUInstallDirs)
. I'm not sure whether #17340 is related.
Edited by Patrik Huber