[Beignet] [PATCH] Fix the bug of LLVM_LFLAGS fail to set

junyan.he at inbox.com junyan.he at inbox.com
Mon Sep 15 20:12:10 PDT 2014


From: Junyan He <junyan.he at linux.intel.com>

The LLVM_LFLAGS is used before finding the LLVM package,
which causes the CMake fails to set correct -L flags and
cause linkage error.

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 CMakeLists.txt |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5decd6..668a088 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,7 +82,6 @@ elseif (COMPILER STREQUAL "ICC")
 endif ()
 set (CMAKE_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof -fno-rtti")
 set (CMAKE_C_FLAGS "${CMAKE_C_CXX_FLAGS}")
-set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${LLVM_LFLAGS}")
 set (CMAKE_CXX_FLAGS_DEBUG          "-O0 -g -DGBE_DEBUG=1")
 set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1")
 set (CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DGBE_DEBUG=0")
@@ -96,6 +95,8 @@ set (CMAKE_C_FLAGS_RELEASE        "-O2 -DNDEBUG -DGBE_DEBUG=0")
 #INCLUDE(CMake/FindLLVM.cmake)
 Find_Package(LLVM 3.3)
 
+set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${LLVM_LFLAGS}")
+
 # XLib
 Find_Package(X11)
 IF(X11_FOUND)
-- 
1.7.9.5





More information about the Beignet mailing list