CMake 2.8.0 compatibility.

This commit is contained in:
David Nadlinger
2012-12-11 23:01:55 +01:00
parent d6c2c83bb6
commit 3fc9a0faa3
2 changed files with 7 additions and 2 deletions

View File

@@ -110,6 +110,12 @@ string(REGEX REPLACE "[0-9]+\\.([0-9]+).*[A-Za-z]*" "\\1" LLVM_VERSION_MINOR "${
# Use the default CMake facilities for handling QUIET/REQUIRED.
include(FindPackageHandleStandardArgs)
if(${CMAKE_VERSION} VERSION_LESS "2.8.4")
# The VERSION_VAR argument is not supported on pre-2.8.4, work around this.
set(VERSION_VAR dummy)
endif()
find_package_handle_standard_args(LLVM
REQUIRED_VARS LLVM_ROOT_DIR LLVM_HOST_TARGET
VERSION_VAR LLVM_VERSION_STRING)