[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
This commit is contained in:
Chris Bieneman 2016-02-10 01:09:59 +00:00
parent a0a0317dbc
commit b33600fe6b
1 changed files with 4 additions and 0 deletions

View 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