[Beignet] [PATCH 1/2] Fix a build problem when the llvm version has the fix version digit.
Yang, Rong R
rong.r.yang at intel.com
Wed Nov 27 00:49:40 PST 2013
LGTM, thanks.
-----Original Message-----
From: beignet-bounces at lists.freedesktop.org [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Zhigang Gong
Sent: Wednesday, November 27, 2013 10:47 AM
To: beignet at lists.freedesktop.org
Cc: Gong, Zhigang
Subject: [Beignet] [PATCH 1/2] 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 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
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list