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

Chris Bieneman beanz at apple.com
Tue Jul 21 08:53:09 PDT 2015


Author: cbieneman
Date: Tue Jul 21 10:53:09 2015
New Revision: 242793

URL: http://llvm.org/viewvc/llvm-project?rev=242793&view=rev
Log:
[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.

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake
    llvm/trunk/tools/CMakeLists.txt

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=242793&r1=242792&r2=242793&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Tue Jul 21 10:53:09 2015
@@ -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()

Modified: llvm/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=242793&r1=242792&r2=242793&view=diff
==============================================================================
--- llvm/trunk/tools/CMakeLists.txt (original)
+++ llvm/trunk/tools/CMakeLists.txt Tue Jul 21 10:53:09 2015
@@ -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()





More information about the llvm-commits mailing list