Skip to content

Commit e14f5f2

Browse files
authoredMay 25, 2024
Revise IDE folder structure (#89755)
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 8bdc577 commit e14f5f2

File tree

9 files changed

+10
-5
lines changed

9 files changed

+10
-5
lines changed
 

‎cross-project-tests/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# The subset inside debuginfo-tests invoke clang to generate programs with
44
# various types of debug info, and then run those programs under a debugger
55
# such as GDB or LLDB to verify the results.
6+
set(LLVM_SUBPROJECT_TITLE "Cross-Project")
67

78
find_package(Python3 COMPONENTS Interpreter)
89

@@ -97,8 +98,3 @@ add_lit_testsuite(check-cross-amdgpu "Running AMDGPU cross-project tests"
9798
add_lit_testsuites(CROSS_PROJECT ${CMAKE_CURRENT_SOURCE_DIR}
9899
DEPENDS ${CROSS_PROJECT_TEST_DEPS}
99100
)
100-
101-
set_target_properties(check-cross-project PROPERTIES FOLDER "Tests")
102-
set_target_properties(check-debuginfo PROPERTIES FOLDER "Tests")
103-
set_target_properties(check-intrinsic-headers PROPERTIES FOLDER "Tests")
104-
set_target_properties(check-cross-amdgpu PROPERTIES FOLDER "Tests")

‎libc/CMakeLists.txt

+1
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 "libc")
23

34
# Include LLVM's cmake policies.
45
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)

‎libcxx/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# Setup Project
66
#===============================================================================
77
cmake_minimum_required(VERSION 3.20.0)
8+
set(LLVM_SUBPROJECT_TITLE "libc++")
89

910
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
1011

‎libcxxabi/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#===============================================================================
66

77
cmake_minimum_required(VERSION 3.20.0)
8+
set(LLVM_SUBPROJECT_TITLE "libc++abi")
89

910
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
1011

‎libunwind/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#===============================================================================
44

55
cmake_minimum_required(VERSION 3.20.0)
6+
set(LLVM_SUBPROJECT_TITLE "libunwind")
67

78
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
89

‎llvm-libgcc/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#===============================================================================
44

55
cmake_minimum_required(VERSION 3.20.0)
6+
set(LLVM_SUBPROJECT_TITLE "LLVM libgcc")
67

78
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
89

‎offload/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# to build offload with CMake.
33

44
cmake_minimum_required(VERSION 3.20.0)
5+
set(LLVM_SUBPROJECT_TITLE "liboffload")
56

67
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
78
set(OPENMP_STANDALONE_BUILD TRUE)

‎pstl/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#
77
#===----------------------------------------------------------------------===##
88
cmake_minimum_required(VERSION 3.20.0)
9+
set(LLVM_SUBPROJECT_TITLE "Parallel STL")
910

1011
set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
1112
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")

‎runtimes/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
99
include(${LLVM_COMMON_CMAKE_UTILS}/Modules/LLVMVersion.cmake)
1010

1111
project(Runtimes C CXX ASM)
12+
set(LLVM_SUBPROJECT_TITLE "Runtimes")
13+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
1214

1315
list(INSERT CMAKE_MODULE_PATH 0
1416
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"

0 commit comments

Comments
 (0)
Please sign in to comment.