aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/LLVM.cmake
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-09-17 15:48:55 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-09-17 15:48:55 +0000
commitd39c594d39df7f283c2fb8a704a3f31c501180d9 (patch)
tree36453626c792cccd91f783a38a169d610a6b9db9 /cmake/modules/LLVM.cmake
parent6144c1de6a7674dad94290650e4e14f24d42e421 (diff)
Diffstat (limited to 'cmake/modules/LLVM.cmake')
-rw-r--r--cmake/modules/LLVM.cmake29
1 files changed, 29 insertions, 0 deletions
diff --git a/cmake/modules/LLVM.cmake b/cmake/modules/LLVM.cmake
new file mode 100644
index 000000000000..9621454f4119
--- /dev/null
+++ b/cmake/modules/LLVM.cmake
@@ -0,0 +1,29 @@
+# This file provides information and services to the final user.
+
+set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@)
+
+set(llvm_libs @llvm_libs@)
+
+set(llvm_lib_targets @llvm_lib_targets@)
+
+set(LLVM_TARGETS_TO_BUILD @LLVM_TARGETS_TO_BUILD@)
+
+set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@)
+
+set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@)
+
+set(LLVM_NATIVE_ARCH @LLVM_NATIVE_ARCH@)
+
+# We try to include using the current setting of CMAKE_MODULE_PATH,
+# which suppossedly was filled by the user with the directory where
+# this file was installed:
+include( LLVMConfig OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED )
+
+# If failed, we assume that this is an un-installed build:
+if( NOT LLVMCONFIG_INCLUDED )
+ set(CMAKE_MODULE_PATH
+ ${CMAKE_MODULE_PATH}
+ "@LLVM_SOURCE_DIR@/cmake/modules")
+ include( LLVMConfig )
+endif()
+