Skip to content

Commit c3efb57

Browse files
authored
[lldb] Revise IDE folder structure (#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

lldb/test/Unit/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-unit-test-deps)
2+
set_target_properties(lldb-unit-test-deps PROPERTIES FOLDER "LLDB/Tests")
23
add_dependencies(lldb-unit-test-deps lldb-test-depends)
34

45
add_lit_testsuites(LLDB-UNIT

lldb/tools/driver/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ add_dependencies(lldb
2828
${tablegen_deps}
2929
)
3030

31-
set_target_properties(LLDBOptionsTableGen PROPERTIES FOLDER "lldb misc")
32-
3331
if(LLDB_BUILD_FRAMEWORK)
3432
# In the build-tree, we know the exact path to the framework directory.
3533
# The installed framework can be in different locations.

lldb/tools/lldb-fuzzer/lldb-commandinterpreter-fuzzer/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ if(TARGET lldb-commandinterpreter-fuzzer)
2929
COMMAND $<TARGET_FILE:lldb-commandinterpreter-fuzzer> -dict=${CMAKE_CURRENT_SOURCE_DIR}/inputdictionary.txt -only_ascii=1 -artifact_prefix=commandinterpreter-
3030
USES_TERMINAL
3131
)
32+
set_target_properties(fuzz-lldb-commandinterpreter PROPERTIES FOLDER "LLDB/Fuzzer")
3233
endif()

lldb/tools/lldb-fuzzer/lldb-target-fuzzer/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ if(TARGET lldb-target-fuzzer)
2525
COMMAND $<TARGET_FILE:lldb-target-fuzzer> -artifact_prefix=target-
2626
USES_TERMINAL
2727
)
28+
set_target_properties(fuzz-lldb-target PROPERTIES FOLDER "LLDB/Fuzzer")
2829
endif()

lldb/tools/lldb-server/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
set(LLVM_TARGET_DEFINITIONS LLGSOptions.td)
22
tablegen(LLVM LLGSOptions.inc -gen-opt-parser-defs)
33
add_public_tablegen_target(LLGSOptionsTableGen)
4-
set_target_properties(LLGSOptionsTableGen PROPERTIES FOLDER "lldb misc")
54

65
set(LLDB_PLUGINS)
76

lldb/unittests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
add_custom_target(LLDBUnitTests)
2-
set_target_properties(LLDBUnitTests PROPERTIES FOLDER "lldb tests")
2+
set_target_properties(LLDBUnitTests PROPERTIES FOLDER "LLDB/Tests")
33

44
add_dependencies(lldb-unit-test-deps LLDBUnitTests)
55

lldb/unittests/tools/lldb-server/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function(add_lldb_test_executable test_name)
77
set_output_directory(${test_name} BINARY_DIR ${outdir} LIBRARY_DIR ${outdir})
88
list(APPEND ALL_LLDB_TEST_EXECUTABLES ${test_name})
99
set(ALL_LLDB_TEST_EXECUTABLES ${ALL_LLDB_TEST_EXECUTABLES} PARENT_SCOPE)
10-
set_target_properties(${test_name} PROPERTIES FOLDER "lldb tests")
10+
set_target_properties(${test_name} PROPERTIES FOLDER "LLDB/Tests")
1111
endfunction()
1212

1313
add_lldb_test_executable(thread_inferior inferior/thread_inferior.cpp)

lldb/utils/TableGen/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ if (NOT DEFINED LLDB_TABLEGEN_EXE)
1313
LLDBTableGen.cpp
1414
LLDBTableGenUtils.cpp
1515
)
16-
set_target_properties(lldb-tblgen PROPERTIES FOLDER "LLDB tablegenning")
1716
endif()
1817
endif()

lldb/utils/lit-cpuid/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ add_lldb_executable(lit-cpuid
66
TargetParser
77
)
88

9-
set_target_properties(lit-cpuid PROPERTIES FOLDER "lldb utils")
9+
set_target_properties(lit-cpuid PROPERTIES FOLDER "LLDB/Utils")

lldb/utils/lldb-dotest/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Make lldb-dotest a custom target.
22
add_custom_target(lldb-dotest)
33
add_dependencies(lldb-dotest lldb-test-depends)
4-
set_target_properties(lldb-dotest PROPERTIES FOLDER "lldb utils")
4+
set_target_properties(lldb-dotest PROPERTIES FOLDER "LLDB/Utils")
55

66
get_property(LLDB_TEST_USER_ARGS GLOBAL PROPERTY LLDB_TEST_USER_ARGS_PROPERTY)
77
get_property(LLDB_TEST_COMMON_ARGS GLOBAL PROPERTY LLDB_TEST_COMMON_ARGS_PROPERTY)

lldb/utils/lldb-repro/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
add_custom_target(lldb-repro)
22
add_dependencies(lldb-repro lldb-test-depends)
3-
set_target_properties(lldb-repro PROPERTIES FOLDER "lldb utils")
3+
set_target_properties(lldb-repro PROPERTIES FOLDER "LLDB/Utils")
44

55
# Generate lldb-repro Python script for each build mode.
66
if(LLDB_BUILT_STANDALONE)

0 commit comments

Comments
 (0)