libzmq/builds/cmake/Modules/FindAsciiDoc.cmake

27 lines
954 B
CMake
Raw Normal View History

# - Find Asciidoc
# this module looks for asciidoc and a2x
#
# ASCIIDOC_EXECUTABLE - the full path to asciidoc
# ASCIIDOC_FOUND - If false, don't attempt to use asciidoc.
# A2X_EXECUTABLE - the full path to a2x
# A2X_FOUND - If false, don't attempt to use a2x.
FindAsciiDoc: fix CMP0053 warning with cmake 3.1 Backported from zeromq/libzmq@032c5ed This commit fixes the following warnings: 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- 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. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- and 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- 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. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
2016-01-30 03:16:22 -05:00
set (PROGRAMFILESX86 "PROGRAMFILES(X86)")
find_program(ASCIIDOC_EXECUTABLE asciidoc asciidoc.py
PATHS "$ENV{ASCIIDOC_ROOT}"
"$ENV{PROGRAMW6432}/asciidoc"
"$ENV{PROGRAMFILES}/asciidoc"
FindAsciiDoc: fix CMP0053 warning with cmake 3.1 Backported from zeromq/libzmq@032c5ed This commit fixes the following warnings: 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- 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. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- and 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- 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. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
2016-01-30 03:16:22 -05:00
"$ENV{${PROGRAMFILESX86}}/asciidoc")
find_program(A2X_EXECUTABLE a2x
PATHS "$ENV{ASCIIDOC_ROOT}"
"$ENV{PROGRAMW6432}/asciidoc"
"$ENV{PROGRAMFILES}/asciidoc"
FindAsciiDoc: fix CMP0053 warning with cmake 3.1 Backported from zeromq/libzmq@032c5ed This commit fixes the following warnings: 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- 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. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- and 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- 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. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
2016-01-30 03:16:22 -05:00
"$ENV{${PROGRAMFILESX86}}/asciidoc")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_ARGS(AsciiDoc REQUIRED_VARS ASCIIDOC_EXECUTABLE)
FindAsciiDoc: fix CMP0053 warning with cmake 3.1 Backported from zeromq/libzmq@032c5ed This commit fixes the following warnings: 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- 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. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- and 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- 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. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
2016-01-30 03:16:22 -05:00
mark_as_advanced(ASCIIDOC_EXECUTABLE A2X_EXECUTABLE)