Start looking for LLVM from version 3.3 then higher version.
authorSimon Richter <Simon.Richter@hogyros.de>
Mon, 2 Dec 2013 13:27:46 +0000 (14:27 +0100)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 8 Jan 2014 02:58:51 +0000 (10:58 +0800)
When different LLVM versions are installed, look for 3.5, 3.4 and 3.3 in
order, then try the system default.

As configuring for 3.1 and 3.2 gives an error now, drop these versions from
the search.

v2:
change to use llvm 3.3 as the preferred version.
update the document accordingly.

Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
CMake/FindLLVM.cmake
docs/Beignet.mdwn

index 339a099..6256cb0 100644 (file)
@@ -7,9 +7,14 @@
 # LLVM_MODULE_LIBS - list of llvm libs for working with modules.
 # LLVM_FOUND       - True if llvm found.
 if (LLVM_INSTALL_DIR)
-  find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-32 llvm-config-3.2 llvm-config-31 llvm-config-3.1 llvm-config-3.4 llvm-config DOC "llvm-config executable" PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
+  find_program(LLVM_CONFIG_EXECUTABLE
+               NAMES llvm-config-33 llvm-config-3.3 llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4 llvm-config
+               DOC "llvm-config executable"
+               PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
 else (LLVM_INSTALL_DIR)
-  find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-32 llvm-config-3.2 llvm-config-31 llvm-config-3.1 llvm-config-3.4 llvm-config DOC "llvm-config executable")
+  find_program(LLVM_CONFIG_EXECUTABLE
+               NAMES llvm-config-33 llvm-config-3.3 llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4 llvm-config
+               DOC "llvm-config executable")
 endif (LLVM_INSTALL_DIR)
 
 if (LLVM_CONFIG_EXECUTABLE)
index 97b568b..d05950f 100644 (file)
@@ -55,7 +55,7 @@ with any thing older.
 
 [http://llvm.org/releases/](http://llvm.org/releases/)
 
-LLVM 3.1,3.2,3.3 and 3.4 are supported.
+LLVM 3.3 and 3.4 are supported.
 
 Also note that the code was compiled on GCC 4.6 and GCC 4.7. Since the code uses
 really recent C++11 features, you may expect problems with older compilers. Last