From 791500fa0d5c0685a4ea22e03718c26e77dff3e0 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Tue, 21 Jul 2015 15:53:09 +0000 Subject: [PATCH] [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 --- cmake/modules/AddLLVM.cmake | 10 ---------- tools/CMakeLists.txt | 7 +++++++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index b03057ff65c..f87e18bfcff 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -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() diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 71af2127810..203169350c5 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -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()