zeromq / zeromq4-x

ØMQ 4.x stable release branch - bug fixes only
GNU General Public License v3.0
457 stars 194 forks source link

FindAsciiDoc: fix CMP0053 warning with cmake 3.1 #145

Closed jcfr closed 8 years ago

jcfr commented 8 years ago

Backported from zeromq/libzmq@032c5ed

This commit fixes the following warnings:

CMake Warning (dev) at builds/cmake/Modules/FindAsciiDoc.cmake:9 (find_program):
  Policy CMP0053 is not set: Simplify variable reference and escape sequence
  evaluation.  Run "cmake --help-policy CMP0053" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For input:

    '$ENV{PROGRAMFILES(X86)}/asciidoc'

  the old evaluation rules produce:

    '/asciidoc'

  but the new evaluation rules produce an error:

    Syntax error in cmake code at
      /path/to/builds/cmake/Modules/FindAsciiDoc.cmake:13
    when parsing string
      $ENV{PROGRAMFILES(X86)}/asciidoc
    Invalid character ('(') in a variable name: 'PROGRAMFILES'

  Using the old result for compatibility since the policy is not set.
Call Stack (most recent call first):
  CMakeLists.txt:193 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

and

CMake Warning (dev) at builds/cmake/Modules/FindAsciiDoc.cmake:15 (find_program):
  Policy CMP0053 is not set: Simplify variable reference and escape sequence
  evaluation.  Run "cmake --help-policy CMP0053" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For input:

    '$ENV{PROGRAMFILES(X86)}/asciidoc'

  the old evaluation rules produce:

    '/asciidoc'

  but the new evaluation rules produce an error:

    Syntax error in cmake code at
      /path/to/builds/cmake/Modules/FindAsciiDoc.cmake:19
    when parsing string
      $ENV{PROGRAMFILES(X86)}/asciidoc
    Invalid character ('(') in a variable name: 'PROGRAMFILES'

  Using the old result for compatibility since the policy is not set.
Call Stack (most recent call first):
  CMakeLists.txt:193 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
jcfr commented 8 years ago

Cc: @somdoron @sustrik @c-rack

hintjens commented 8 years ago

@jcfr thank you for the patches. Please read the C4.1 at rfc.zeromq.org/spec:22; you do not need to ping anyone to get your pull request merged. Also please try to state the Problem: in your commit header line.