diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2013-11-27 10:01:56 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2013-11-27 16:25:45 +0800 |
commit | f1065c8e0d694b622d1030870059a22d3f5ab8e3 (patch) | |
tree | 9f5127fc2f6b07d66f132205ed9e2e2843ea56db /CMake | |
parent | 011a01321ee7a2060c0b5e18e940068ad6ddb388 (diff) |
Fix a build problem when the llvm version has the fix version digit.
If the llvm version is something like 3.3.1, the previous cmake script
will generate an incorrect cflags as: -DLLVM_33 1 which breaks the build.
This commit also update the stable llvm version from 3.1 to 3.3.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/FindLLVM.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake index 3fa9ad91..339a0994 100644 --- a/CMake/FindLLVM.cmake +++ b/CMake/FindLLVM.cmake @@ -24,7 +24,7 @@ if (LLVM_FIND_VERSION_MAJOR AND LLVM_FIND_VERSION_MINOR) COMMAND ${LLVM_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE LLVM_VERSION ) - string(REGEX REPLACE "([0-9]*)\\.([0-9]*)[^0-9]*" "\\1\\2 " LLVM_VERSION_NODOT ${LLVM_VERSION}) + string(REGEX REPLACE "([0-9])\\.([0-9]*).*" "\\1\\2 " LLVM_VERSION_NODOT ${LLVM_VERSION}) if (LLVM_VERSION_NODOT VERSION_LESS LLVM_FIND_VERSION_NODOT) message(FATAL_ERROR "imcompatible LLVM version ${LLVM_VERSION} required ${LLVM_FIND_VERSION}") else (LLVM_VERSION_NODOT VERSION_LESS LLVM_FIND_VERSION_NODOT) |