[Beignet] [PATCH 1/2] Fix a build problem when the llvm version has the fix version digit.
Zhigang Gong
zhigang.gong at intel.com
Tue Nov 26 18:46:48 PST 2013
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 at intel.com>
---
CMake/FindLLVM.cmake | 2 +-
CMakeLists.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake
index 3fa9ad9..ba827b5 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)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ec6c08..b44e7a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,7 @@ SET(CMAKE_C_FLAGS "-Wall -mfpmath=sse -msse2 -Wcast-align -msse2 -msse3 -mssse3
# Front end stuff we need
#INCLUDE(CMake/FindLLVM.cmake)
-Find_Package(LLVM 3.1)
+Find_Package(LLVM 3.3)
# XLib
Find_Package(X11)
--
1.7.9.5
More information about the Beignet
mailing list