]> granicus.if.org Git - clang/commitdiff
[CMake] Pass LLVM_EXTERNAL_*_SOURCE_DIR variables to subsequent stages
authorChris Bieneman <beanz@apple.com>
Wed, 10 Feb 2016 01:09:59 +0000 (01:09 +0000)
committerChris Bieneman <beanz@apple.com>
Wed, 10 Feb 2016 01:09:59 +0000 (01:09 +0000)
For multi-stage builds we need to pass any overridden source directory variables. Without passing these the subsequent stages won't find the project sources.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260341 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt

index 7542bb46160edb20a182b1e7ac4d5f72c13ef9ec..96f771b2155347a8f4ad07bc0cffcac51cc9d14d 100644 (file)
@@ -735,6 +735,10 @@ if (CLANG_ENABLE_BOOTSTRAP)
       list(APPEND PASSTHROUGH_VARIABLES
         -D${varName}=${value})
     endif()
+    if(${variableName} AND variableName MATCHES "LLVM_EXTERNAL_.*_SOURCE_DIR")
+      list(APPEND PASSTHROUGH_VARIABLES
+        -D${variableName}=${${variableName}})
+    endif()
   endforeach()
 
   # Populate the passthrough variables