[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/Meinersbur reopened https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/Meinersbur closed https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/ldionne approved this pull request. LGTM. After checking, I think this only impacts `add_lit_testsuites` since we don't use many other things from `AddLLVM.cmake` in the runtimes. https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/89755 >From 0ce849c6e5455577a77f4c25d08e8ec83115a290 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 23 Apr 2024 13:29:28 +0200 Subject: [PATCH 1/2] Revise IDE folder structure --- cross-project-tests/CMakeLists.txt | 6 +- libc/CMakeLists.txt| 1 + libcxx/CMakeLists.txt | 1 + libcxxabi/CMakeLists.txt | 1 + libunwind/CMakeLists.txt | 1 + llvm-libgcc/CMakeLists.txt | 1 + offload/CMakeLists.txt | 1 + pstl/CMakeLists.txt| 1 + runtimes/CMakeLists.txt| 1 + 9 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cross-project-tests/CMakeLists.txt b/cross-project-tests/CMakeLists.txt index f7c2ca7ad83de..7f2fee48fda77 100644 --- a/cross-project-tests/CMakeLists.txt +++ b/cross-project-tests/CMakeLists.txt @@ -3,6 +3,7 @@ # The subset inside debuginfo-tests invoke clang to generate programs with # various types of debug info, and then run those programs under a debugger # such as GDB or LLDB to verify the results. +set(LLVM_SUBPROJECT_TITLE "Cross-Project") find_package(Python3 COMPONENTS Interpreter) @@ -97,8 +98,3 @@ add_lit_testsuite(check-cross-amdgpu "Running AMDGPU cross-project tests" add_lit_testsuites(CROSS_PROJECT ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CROSS_PROJECT_TEST_DEPS} ) - -set_target_properties(check-cross-project PROPERTIES FOLDER "Tests") -set_target_properties(check-debuginfo PROPERTIES FOLDER "Tests") -set_target_properties(check-intrinsic-headers PROPERTIES FOLDER "Tests") -set_target_properties(check-cross-amdgpu PROPERTIES FOLDER "Tests") diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt index 175efd89d67e6..f35471a06a53e 100644 --- a/libc/CMakeLists.txt +++ b/libc/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc") # Include LLVM's cmake policies. if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 2977c26646cb2..d75f22ecf0222 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -5,6 +5,7 @@ # Setup Project #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc++") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index da998d2221dc4..f7673da25d20e 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -5,6 +5,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc++abi") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 806d5a783ec39..2117cd9e756ef 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -3,6 +3,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libunwind") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/llvm-libgcc/CMakeLists.txt b/llvm-libgcc/CMakeLists.txt index 013c9ca2e3307..c6641ab9e3219 100644 --- a/llvm-libgcc/CMakeLists.txt +++ b/llvm-libgcc/CMakeLists.txt @@ -3,6 +3,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "LLVM libgcc") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt index abc8baa0805ff..44a3d17b2e59a 100644 --- a/offload/CMakeLists.txt +++ b/offload/CMakeLists.txt @@ -11,6 +11,7 @@ ##===--===## cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "liboffload") if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") set(OPENMP_STANDALONE_BUILD TRUE) diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt index 255e22af9a26b..592e11d356473 100644 --- a/pstl/CMakeLists.txt +++ b/pstl/CMakeLists.txt @@ -6,6 +6,7 @@ # #===--===## cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "Parallel STL") set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h") file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$") diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index fcc59c8fa1c37..76ad8aa1f353e 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -9,6 +9,7 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
@@ -9,6 +9,7 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake include(${LLVM_COMMON_CMAKE_UTILS}/Modules/LLVMVersion.cmake) project(Runtimes C CXX ASM) +set(LLVM_SUBPROJECT_TITLE "Runtimes") Meinersbur wrote: Since LLVM is usually the top-level project everything is sorted under "LLVM" be default. I added a `LLVM_SUBPROJECT_TITLE` to all potential subprojects that are either included via `add_subdirectory` or as a stand-alone build, including this one. I just checked to see if it is actually used, and the answer is yes: At least `check-runtimes` is put into this folder when loading the solution from the `runtimes-bins` directory. I did not go through all runtime targets to ensure they are put into some folder name that makes sense like I did for the LLVM_ENABLE_PROJECTS subprojects since opening a project in the IDE from the runtimes-bin would be done only if there is a concrete problem. However, I wanted to at least make a minimal effort that allows puts targets other than `add_custom_target` into a subtproject folder. https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/89755 >From 0ce849c6e5455577a77f4c25d08e8ec83115a290 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 23 Apr 2024 13:29:28 +0200 Subject: [PATCH] Revise IDE folder structure --- cross-project-tests/CMakeLists.txt | 6 +- libc/CMakeLists.txt| 1 + libcxx/CMakeLists.txt | 1 + libcxxabi/CMakeLists.txt | 1 + libunwind/CMakeLists.txt | 1 + llvm-libgcc/CMakeLists.txt | 1 + offload/CMakeLists.txt | 1 + pstl/CMakeLists.txt| 1 + runtimes/CMakeLists.txt| 1 + 9 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cross-project-tests/CMakeLists.txt b/cross-project-tests/CMakeLists.txt index f7c2ca7ad83de..7f2fee48fda77 100644 --- a/cross-project-tests/CMakeLists.txt +++ b/cross-project-tests/CMakeLists.txt @@ -3,6 +3,7 @@ # The subset inside debuginfo-tests invoke clang to generate programs with # various types of debug info, and then run those programs under a debugger # such as GDB or LLDB to verify the results. +set(LLVM_SUBPROJECT_TITLE "Cross-Project") find_package(Python3 COMPONENTS Interpreter) @@ -97,8 +98,3 @@ add_lit_testsuite(check-cross-amdgpu "Running AMDGPU cross-project tests" add_lit_testsuites(CROSS_PROJECT ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CROSS_PROJECT_TEST_DEPS} ) - -set_target_properties(check-cross-project PROPERTIES FOLDER "Tests") -set_target_properties(check-debuginfo PROPERTIES FOLDER "Tests") -set_target_properties(check-intrinsic-headers PROPERTIES FOLDER "Tests") -set_target_properties(check-cross-amdgpu PROPERTIES FOLDER "Tests") diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt index 175efd89d67e6..f35471a06a53e 100644 --- a/libc/CMakeLists.txt +++ b/libc/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc") # Include LLVM's cmake policies. if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 2977c26646cb2..d75f22ecf0222 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -5,6 +5,7 @@ # Setup Project #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc++") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index da998d2221dc4..f7673da25d20e 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -5,6 +5,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc++abi") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 806d5a783ec39..2117cd9e756ef 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -3,6 +3,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libunwind") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/llvm-libgcc/CMakeLists.txt b/llvm-libgcc/CMakeLists.txt index 013c9ca2e3307..c6641ab9e3219 100644 --- a/llvm-libgcc/CMakeLists.txt +++ b/llvm-libgcc/CMakeLists.txt @@ -3,6 +3,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "LLVM libgcc") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt index abc8baa0805ff..44a3d17b2e59a 100644 --- a/offload/CMakeLists.txt +++ b/offload/CMakeLists.txt @@ -11,6 +11,7 @@ ##===--===## cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "liboffload") if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") set(OPENMP_STANDALONE_BUILD TRUE) diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt index 255e22af9a26b..592e11d356473 100644 --- a/pstl/CMakeLists.txt +++ b/pstl/CMakeLists.txt @@ -6,6 +6,7 @@ # #===--===## cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "Parallel STL") set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h") file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$") diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index fcc59c8fa1c37..76ad8aa1f353e 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -9,6 +9,7 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
@@ -9,6 +9,7 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake include(${LLVM_COMMON_CMAKE_UTILS}/Modules/LLVMVersion.cmake) project(Runtimes C CXX ASM) +set(LLVM_SUBPROJECT_TITLE "Runtimes") jhuber6 wrote: Is this needed? My understanding is that the runtimes CMake here is the root that includes all the other projects, so this doesn't actually contain any "projects'> https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/nickdesaulniers approved this pull request. libc parts LGTM https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Michael Kruse (Meinersbur) Changes Reviewers of #89153 suggested to break up the patch into per-subproject patches. This is the part for the remaining subprojects that have just one file changed each. For the runtime subprojects this is because they cannot be used in `LLVM_ENABLE_PROJECTS` and therefore its targets do not appear in the IDE when compiling as part of LLVM. `LLVM_SUBPROJECT_TITLE` is still defined and useful when loading the project from the `runtimes/runtimes-bins` folder withing the LLVM build dir, or for out-of-tree builds. A follow-up patch may do a more complete folder organization. See #89153 for the entire series and motivation. 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. --- Full diff: https://github.com/llvm/llvm-project/pull/89755.diff 9 Files Affected: - (modified) cross-project-tests/CMakeLists.txt (+1-5) - (modified) libc/CMakeLists.txt (+1) - (modified) libcxx/CMakeLists.txt (+1) - (modified) libcxxabi/CMakeLists.txt (+1) - (modified) libunwind/CMakeLists.txt (+1) - (modified) llvm-libgcc/CMakeLists.txt (+1) - (modified) offload/CMakeLists.txt (+1) - (modified) pstl/CMakeLists.txt (+1) - (modified) runtimes/CMakeLists.txt (+1) ``diff diff --git a/cross-project-tests/CMakeLists.txt b/cross-project-tests/CMakeLists.txt index f7c2ca7ad83de..7f2fee48fda77 100644 --- a/cross-project-tests/CMakeLists.txt +++ b/cross-project-tests/CMakeLists.txt @@ -3,6 +3,7 @@ # The subset inside debuginfo-tests invoke clang to generate programs with # various types of debug info, and then run those programs under a debugger # such as GDB or LLDB to verify the results. +set(LLVM_SUBPROJECT_TITLE "Cross-Project") find_package(Python3 COMPONENTS Interpreter) @@ -97,8 +98,3 @@ add_lit_testsuite(check-cross-amdgpu "Running AMDGPU cross-project tests" add_lit_testsuites(CROSS_PROJECT ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CROSS_PROJECT_TEST_DEPS} ) - -set_target_properties(check-cross-project PROPERTIES FOLDER "Tests") -set_target_properties(check-debuginfo PROPERTIES FOLDER "Tests") -set_target_properties(check-intrinsic-headers PROPERTIES FOLDER "Tests") -set_target_properties(check-cross-amdgpu PROPERTIES FOLDER "Tests") diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt index 175efd89d67e6..f35471a06a53e 100644 --- a/libc/CMakeLists.txt +++ b/libc/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc") # Include LLVM's cmake policies. if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 2977c26646cb2..d75f22ecf0222 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -5,6 +5,7 @@ # Setup Project #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc++") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index da998d2221dc4..f7673da25d20e 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -5,6 +5,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc++abi") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 806d5a783ec39..2117cd9e756ef 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -3,6 +3,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libunwind") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/llvm-libgcc/CMakeLists.txt b/llvm-libgcc/CMakeLists.txt index 013c9ca2e3307..c6641ab9e3219 100644 --- a/llvm-libgcc/CMakeLists.txt +++ b/llvm-libgcc/CMakeLists.txt @@ -3,6 +3,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "LLVM libgcc")
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/Meinersbur ready_for_review https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/ldionne approved this pull request. https://github.com/llvm/llvm-project/pull/89755 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [pstl] Revise IDE folder structure (PR #89755)
https://github.com/Meinersbur created https://github.com/llvm/llvm-project/pull/89755 Reviewers of #89153 suggested to break up the patch into per-subproject patches. This is the part for the remaining subprojects that have just one file changed each. For the runtime subprojects this is because they cannot be used in `LLVM_ENABLE_PROJECTS` and therefore its targets do not appear in the IDE when compiling as part of LLVM. `LLVM_SUBPROJECT_TITLE` is still defined and useful when loading the project from the `runtimes/runtimes-bins` folder withing the LLVM build dir, or for out-of-tree builds. A follow-up patch may do a more complete folder organization. See #89153 for the entire series and motivation. 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 PROPERTY FOLDER "")`) 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. >From 0ce849c6e5455577a77f4c25d08e8ec83115a290 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 23 Apr 2024 13:29:28 +0200 Subject: [PATCH] Revise IDE folder structure --- cross-project-tests/CMakeLists.txt | 6 +- libc/CMakeLists.txt| 1 + libcxx/CMakeLists.txt | 1 + libcxxabi/CMakeLists.txt | 1 + libunwind/CMakeLists.txt | 1 + llvm-libgcc/CMakeLists.txt | 1 + offload/CMakeLists.txt | 1 + pstl/CMakeLists.txt| 1 + runtimes/CMakeLists.txt| 1 + 9 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cross-project-tests/CMakeLists.txt b/cross-project-tests/CMakeLists.txt index f7c2ca7ad83de3..7f2fee48fda778 100644 --- a/cross-project-tests/CMakeLists.txt +++ b/cross-project-tests/CMakeLists.txt @@ -3,6 +3,7 @@ # The subset inside debuginfo-tests invoke clang to generate programs with # various types of debug info, and then run those programs under a debugger # such as GDB or LLDB to verify the results. +set(LLVM_SUBPROJECT_TITLE "Cross-Project") find_package(Python3 COMPONENTS Interpreter) @@ -97,8 +98,3 @@ add_lit_testsuite(check-cross-amdgpu "Running AMDGPU cross-project tests" add_lit_testsuites(CROSS_PROJECT ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CROSS_PROJECT_TEST_DEPS} ) - -set_target_properties(check-cross-project PROPERTIES FOLDER "Tests") -set_target_properties(check-debuginfo PROPERTIES FOLDER "Tests") -set_target_properties(check-intrinsic-headers PROPERTIES FOLDER "Tests") -set_target_properties(check-cross-amdgpu PROPERTIES FOLDER "Tests") diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt index 175efd89d67e6d..f35471a06a53e5 100644 --- a/libc/CMakeLists.txt +++ b/libc/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc") # Include LLVM's cmake policies. if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 2977c26646cb2e..d75f22ecf02229 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -5,6 +5,7 @@ # Setup Project #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc++") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index da998d2221dc4f..f7673da25d20e0 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -5,6 +5,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libc++abi") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 806d5a783ec39c..2117cd9e756efc 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -3,6 +3,7 @@ #=== cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "libunwind") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") diff --git a/llvm-libgcc/CMakeLists.txt b/llvm-libgcc/CMakeLists.txt index 013c9ca2e33076..c6641ab9e32191 100644 --- a/llvm-libgcc/CMakeLists.txt +++ b/llvm-libgcc/CMakeLists.txt @@ -3,6 +3,7 @@