[CMake] Projects supported via LLVM_EXTERNAL_*_SOURCE_DIR need to be explicitly specified.

One part of my refactoring from r242705 is untenable due to how CMake caches variables. There is no way other than caching to allow variables to be set in one directory and globally readable, but we really don't want to cache the temporary value marking that a directory has already been included.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242793 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Bieneman 2015-07-21 15:53:09 +00:00
parent 4a3c9fcd83
commit 791500fa0d
2 changed files with 7 additions and 10 deletions

View File

@ -761,16 +761,6 @@ function(add_llvm_implicit_projects)
endif()
endforeach()
get_cmake_property(variableNames VARIABLES)
foreach (variableName ${variableNames})
get_project_name_from_src_var(${variableName} projectName)
if(projectName)
string(TOLOWER ${projectName} projectName)
list(APPEND list_of_implicit_subdirs ${projectName})
endif()
endforeach()
list(REMOVE_DUPLICATES list_of_implicit_subdirs)
foreach(external_proj ${list_of_implicit_subdirs})
add_llvm_external_project("${external_proj}")
endforeach()

View File

@ -30,6 +30,13 @@ if(CYGWIN OR NOT LLVM_ENABLE_PIC)
set(LLVM_TOOL_LLVM_LTO_BUILD Off)
endif()
# Projects supported via LLVM_EXTERNAL_*_SOURCE_DIR need to be explicitly
# specified.
add_llvm_external_project(clang)
add_llvm_external_project(llgo)
add_llvm_external_project(lld)
add_llvm_external_project(lldb)
# Automatically add remaining sub-directories containing a 'CMakeLists.txt'
# file as external projects.
add_llvm_implicit_projects()