Skip to content

Commit c3efb57

Browse files
authored
[lldb] Revise IDE folder structure (llvm#89748)
Update the folder titles for targets in the monorepository that have not seen taken care of for some time. These are the folders that targets are organized in Visual Studio and XCode (`set_property(TARGET <target> PROPERTY FOLDER "<title>")`) when using the respective CMake's IDE generator. * Ensure that every target is in a folder * Use a folder hierarchy with each LLVM subproject as a top-level folder * Use consistent folder names between subprojects * When using target-creating functions from AddLLVM.cmake, automatically deduce the folder. This reduces the number of `set_property`/`set_target_property`, but are still necessary when `add_custom_target`, `add_executable`, `add_library`, etc. are used. A LLVM_SUBPROJECT_TITLE definition is used for that in each subproject's root CMakeLists.txt.
1 parent 76e7c8f commit c3efb57

File tree

21 files changed

+21
-21
lines changed

21 files changed

+21
-21
lines changed

lldb/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cmake_minimum_required(VERSION 3.20.0)
2+
set(LLVM_SUBPROJECT_TITLE "LLDB")
23

34
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
45
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)

lldb/cmake/modules/AddLLDB.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ function(lldb_tablegen)
2929

3030
if(LTG_TARGET)
3131
add_public_tablegen_target(${LTG_TARGET})
32-
set_target_properties( ${LTG_TARGET} PROPERTIES FOLDER "LLDB tablegenning")
3332
set_property(GLOBAL APPEND PROPERTY LLDB_TABLEGEN_TARGETS ${LTG_TARGET})
3433
endif()
3534
endfunction(lldb_tablegen)
@@ -165,10 +164,10 @@ function(add_lldb_library name)
165164
get_property(parent_dir DIRECTORY PROPERTY PARENT_DIRECTORY)
166165
if(EXISTS ${parent_dir})
167166
get_filename_component(category ${parent_dir} NAME)
168-
set_target_properties(${name} PROPERTIES FOLDER "lldb plugins/${category}")
167+
set_target_properties(${name} PROPERTIES FOLDER "LLDB/Plugins/${category}")
169168
endif()
170169
else()
171-
set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
170+
set_target_properties(${name} PROPERTIES FOLDER "LLDB/Libraries")
172171
endif()
173172

174173
# If we want to export all lldb symbols (i.e LLDB_EXPORT_ALL_SYMBOLS=ON), we
@@ -208,7 +207,6 @@ function(add_lldb_executable name)
208207
else()
209208
target_link_libraries(${name} PRIVATE ${ARG_CLANG_LIBS})
210209
endif()
211-
set_target_properties(${name} PROPERTIES FOLDER "lldb executables")
212210

213211
if (ARG_BUILD_RPATH)
214212
set_target_properties(${name} PROPERTIES BUILD_RPATH "${ARG_BUILD_RPATH}")

lldb/cmake/modules/LLDBConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
266266
)
267267

268268
add_custom_target(lldb-headers)
269-
set_target_properties(lldb-headers PROPERTIES FOLDER "lldb misc")
269+
set_target_properties(lldb-headers PROPERTIES FOLDER "LLDB/Resources")
270270

271271
if (NOT CMAKE_CONFIGURATION_TYPES)
272272
add_llvm_install_targets(install-lldb-headers

lldb/cmake/modules/LLDBFramework.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ endforeach()
106106

107107
# Wrap output in a target, so lldb-framework can depend on it.
108108
add_custom_target(liblldb-resource-headers DEPENDS lldb-sbapi-dwarf-enums ${lldb_staged_headers})
109-
set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "lldb misc")
109+
set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "LLDB/Resources")
110110
add_dependencies(liblldb liblldb-resource-headers)
111111

112112
# At build time, copy the staged headers into the framework bundle (and do

lldb/cmake/modules/LLDBStandalone.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ if(LLVM_USE_FOLDERS)
118118
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
119119
endif()
120120

121-
set_target_properties(clang-tablegen-targets PROPERTIES FOLDER "lldb misc")
122-
set_target_properties(intrinsics_gen PROPERTIES FOLDER "lldb misc")
121+
set_target_properties(clang-tablegen-targets PROPERTIES FOLDER "Clang/Tablegenning")
122+
set_target_properties(intrinsics_gen PROPERTIES FOLDER "LLVM/Tablegenning")
123123

124124
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
125125
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)

lldb/docs/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if(DOXYGEN_FOUND)
1313
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
1414
COMMENT "Generating LLDB C++ API reference with Doxygen" VERBATIM
1515
)
16+
set_target_properties(lldb-cpp-doc PROPERTIES FOLDER "LLDB/Docs")
1617
endif()
1718

1819
if (LLVM_ENABLE_SPHINX)

lldb/source/API/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ add_custom_command(
3838
)
3939
add_custom_target(lldb-sbapi-dwarf-enums
4040
DEPENDS ${sb_languages_file})
41+
set_target_properties(lldb-sbapi-dwarf-enums PROPERTIES FOLDER "LLDB/Tablegenning")
4142

4243
add_lldb_library(liblldb SHARED ${option_framework}
4344
SBAddress.cpp
@@ -215,7 +216,6 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
215216
"Only the SB API is guaranteed to be stable.")
216217
add_llvm_symbol_exports(liblldb "${LLDB_EXPORT_ALL_SYMBOLS_EXPORTS_FILE}")
217218
endif()
218-
set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc")
219219
elseif (LLDB_EXPORT_ALL_SYMBOLS)
220220
MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")
221221

@@ -254,7 +254,6 @@ elseif (LLDB_EXPORT_ALL_SYMBOLS)
254254
)
255255

256256
add_llvm_symbol_exports(liblldb ${exported_symbol_file})
257-
set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc")
258257
endif()
259258

260259
if (NOT MSVC)

lldb/test/API/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
add_custom_target(lldb-api-test-deps)
2+
set_target_properties(lldb-api-test-deps PROPERTIES FOLDER "LLDB/Tests")
23
add_dependencies(lldb-api-test-deps lldb-test-depends)
34

45
add_lit_testsuites(LLDB-API

lldb/test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TOOLS_DIR ${LLVM_RUNT
9191

9292
# Create a custom target to track test dependencies.
9393
add_custom_target(lldb-test-depends)
94-
set_target_properties(lldb-test-depends PROPERTIES FOLDER "lldb misc")
94+
set_target_properties(lldb-test-depends PROPERTIES FOLDER "LLDB/Tests")
9595

9696
# Create an alias for the legacy name of lldb-test-depends
9797
add_custom_target(lldb-test-deps)
98+
set_target_properties(lldb-test-deps PROPERTIES FOLDER "LLDB/Tests")
9899
add_dependencies(lldb-test-deps lldb-test-depends)
99100

100101
function(add_lldb_test_dependency)
@@ -265,7 +266,6 @@ add_lit_testsuite(check-lldb "Running lldb lit test suite"
265266
lldb-api-test-deps
266267
lldb-shell-test-deps
267268
lldb-unit-test-deps)
268-
set_target_properties(check-lldb PROPERTIES FOLDER "lldb tests")
269269

270270
if(LLDB_BUILT_STANDALONE)
271271
# This has to happen *AFTER* add_lit_testsuite.

lldb/test/Shell/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
add_custom_target(lldb-shell-test-deps)
2+
set_target_properties(lldb-shell-test-deps PROPERTIES FOLDER "LLDB/Tests")
23
add_dependencies(lldb-shell-test-deps lldb-test-depends)
34

45
add_lit_testsuites(LLDB-SHELL

0 commit comments

Comments
 (0)