Bug #80066 cmake warning in ndb_check_mysql_include_file.cmake
Submitted: 20 Jan 2016 10:44 Modified: 26 Jan 2016 17:31
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.5.1 OS:Any
Assigned to: CPU Architecture:Any

[20 Jan 2016 10:44] Magnus Blåudd
Description:
-- Building NDB 32-bit
CMake Warning (dev) at storage/ndb/cmake/ndb_check_mysql_include_file.cmake:17 (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_MY_DEFAULT_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):
  storage/ndb/ndb_configure.cmake:215 (NDB_CHECK_MYSQL_INCLUDE_FILE)
  storage/ndb/CMakeLists.txt:165 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

How to repeat:
Using cmake version 3.4.1

$ cmake --version
cmake version 3.4.1

Suggested fix:
Dereference the "VARIABLE" variable to evaluate it properly before using it in the if statement.
[26 Jan 2016 17:31] Jon Stephens
Fixed in NDB 7.5.1. Documented as follows in the NDB 7.5.1 changelog:

  Suppressed a CMake warning caused by use of a quoted variable name 
  that occurred when building on 32-bit platforms.

Closed.
[27 Jan 2016 11:05] Jon Stephens
NOTE: This issue was NOT confined to 32-bit platforms. Changelog entry amended accordingly.