[Lldb-commits] [PATCH] D64865: [CMake] Polish folders in generated Xcode project

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 17 06:28:02 PDT 2019


sgraenitz created this revision.
sgraenitz added reviewers: jingham, mib, stella.stamenova.
Herald added a subscriber: mgorny.
Herald added a project: LLDB.

Group plugins by subfolder. Move liblldb-resource-headers to `lldb misc`. Avoid install-distribution related targets in IDE-enabled builds.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64865

Files:
  lldb/CMakeLists.txt
  lldb/cmake/modules/AddLLDB.cmake
  lldb/cmake/modules/LLDBFramework.cmake


Index: lldb/cmake/modules/LLDBFramework.cmake
===================================================================
--- lldb/cmake/modules/LLDBFramework.cmake
+++ lldb/cmake/modules/LLDBFramework.cmake
@@ -78,6 +78,7 @@
 
 # Wrap output in a target, so lldb-framework can depend on it.
 add_custom_target(liblldb-resource-headers DEPENDS ${lldb_staged_headers})
+set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "lldb misc")
 add_dependencies(liblldb liblldb-resource-headers)
 
 # At build time, copy the staged headers into the framework bundle (and do
Index: lldb/cmake/modules/AddLLDB.cmake
===================================================================
--- lldb/cmake/modules/AddLLDB.cmake
+++ lldb/cmake/modules/AddLLDB.cmake
@@ -122,7 +122,11 @@
   target_compile_options(${name} PRIVATE ${PARAM_EXTRA_CXXFLAGS})
 
   if(PARAM_PLUGIN)
-    set_target_properties(${name} PROPERTIES FOLDER "lldb plugins")
+    get_property(parent_dir DIRECTORY PROPERTY PARENT_DIRECTORY)
+    if(EXISTS ${parent_dir})
+      get_filename_component(category ${parent_dir} NAME)
+      set_target_properties(${name} PROPERTIES FOLDER "lldb plugins/${category}")
+    endif()
   else()
     set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
   endif()
Index: lldb/CMakeLists.txt
===================================================================
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -219,6 +219,6 @@
     endif ()
 endif ()
 
-if(LLDB_BUILT_STANDALONE)
+if(LLDB_BUILT_STANDALONE AND NOT LLVM_ENABLE_IDE)
   llvm_distribution_add_targets()
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64865.210311.patch
Type: text/x-patch
Size: 1584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190717/fd16a4fd/attachment.bin>


More information about the lldb-commits mailing list