Enabling LLVM & Clang to be cross-compiled using CMake from a single configuration...
[oota-llvm.git] / CMakeLists.txt
index cdaf3bbd166543ff0988c01677b4d2c0915a3529..f4195ae6346985e8fae082cef1d2b66d42a1beb3 100644 (file)
@@ -470,6 +470,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
 include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR})
 
+# when crosscompiling import the executable targets from a file
+if(CMAKE_CROSSCOMPILING)
+  include(CrossCompile)
+endif(CMAKE_CROSSCOMPILING)
+
 if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD )
   # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM
   # with libxml2, iconv.h, etc., we must add /usr/local paths.