Author: filcab
Date: Tue Mar 1 08:08:13 2016
New Revision: 262334
URL: http://llvm.org/viewvc/llvm-project?rev=262334&view=rev
Log:
[cmake] Fallback to LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR if
COMPILER_RT_SRC_ROOT doesn't exist.
Modified:
cfe/trunk/runtime/CMakeLists.txt
Modified: cfe/trunk/runtime/CMakeLists.txt
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/runtime/CMakeLists.txt?rev=262334&r1=262333&r2=262334&view=diff
==============================================================================
--- cfe/trunk/runtime/CMakeLists.txt (original)
+++ cfe/trunk/runtime/CMakeLists.txt Tue Mar 1 08:08:13 2016
@@ -23,6 +23,13 @@ function(get_ext_project_build_command o
endfunction()
set(COMPILER_RT_SRC_ROOT ${LLVM_MAIN_SRC_DIR}/projects/compiler-rt)
+# Fallback to the external path, if the other one isn't available.
+# This is the same behavior (try "internal", then check the LLVM_EXTERNAL_...
+# variable) as in add_llvm_external_project
+if(NOT EXISTS ${COMPILER_RT_SRC_ROOT})
+ set(COMPILER_RT_SRC_ROOT ${LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR})
+endif()
+
if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
if(CMAKE_VERSION VERSION_GREATER 3.3.20150708)
set(cmake_3_4_USES_TERMINAL_OPTIONS
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits