From b33600fe6b728629fe7ba156ad066fac4f4ab90c Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 10 Feb 2016 01:09:59 +0000 Subject: [PATCH] [CMake] Pass LLVM_EXTERNAL_*_SOURCE_DIR variables to subsequent stages 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. llvm-svn: 260341 --- clang/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 7542bb46160e..96f771b21553 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -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