crossbario / autobahn-cpp

WAMP for C++ in Boost/Asio
https://crossbar.io/autobahn
Boost Software License 1.0
251 stars 104 forks source link

Fix CMake warning about deprecated quoted variable dereferencing #208

Closed robinlinden closed 4 years ago

robinlinden commented 4 years ago

It should be fine to just opt into the new behaviour when it exists as autobahn-cpp doesn't seem to make use of it anyway. https://cmake.org/cmake/help/latest/policy/CMP0054.html

CMake Warning (dev) at build/_deps/autobahn-cpp-src/cmake/Includes/CMakeLists.txt:20 (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 "MSVC" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.

Another alternative for fixing this would be to bump the cmake_minimum_required from 2.8 to 3.1 (or higher). https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html