Skip to content

Commit ad0be33

Browse files
committed
Default to LLVM subproject title
1 parent f1e1293 commit ad0be33

File tree

12 files changed

+22
-43
lines changed

12 files changed

+22
-43
lines changed

bolt/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
set(LLVM_SUBPROJECT_TITLE "BOLT")
2+
23
include(ExternalProject)
34

45
set(BOLT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

clang/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ add_custom_target(clang-tablegen-targets
480480
omp_gen
481481
ClangDriverOptions
482482
${CLANG_TABLEGEN_TARGETS})
483-
set_target_properties(clang-tablegen-targets PROPERTIES FOLDER "Clang/Misc")
483+
set_target_properties(clang-tablegen-targets PROPERTIES FOLDER "Clang/Tablegenning/Targets")
484484
list(APPEND LLVM_COMMON_DEPENDS clang-tablegen-targets)
485485

486486
# Force target to be built as soon as possible. Clang modules builds depend
@@ -543,7 +543,7 @@ endif()
543543

544544
# Custom target to install all clang libraries.
545545
add_custom_target(clang-libraries)
546-
set_target_properties(clang-libraries PROPERTIES FOLDER "Clang/Meta")
546+
set_target_properties(clang-libraries PROPERTIES FOLDER "Clang/Install")
547547

548548
if(NOT LLVM_ENABLE_IDE)
549549
add_llvm_install_targets(install-clang-libraries

flang/unittests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function(add_flang_nongtest_unittest test_name)
5555
endif()
5656

5757
add_executable(${test_name}${suffix} ${test_name}.cpp)
58-
set_target_properties(${test_name}${suffix} PROPERTIES FOLDER "Flang/Tests/Unittests")
58+
set_target_properties(${test_name}${suffix} PROPERTIES FOLDER "Flang/Tests/Unit")
5959

6060
if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
6161
set(llvm_libs LLVM)

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

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

libcxx/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,18 @@ include(LLVMProcessSources)
44
include(LLVM-Config)
55
include(DetermineGCCCompatible)
66

7-
# Set ${outvar} to the title of the current LLVM subproject (Clang, Flang, MLIR ...)
7+
# get_subproject_title(titlevar)
8+
# Set ${outvar} to the title of the current LLVM subproject (Clang, MLIR ...)
89
#
10+
# The title is set in the subproject's top-level using the variable
11+
# LLVM_SUBPROJECT_TITLE. If it does not exist, it is assumed it is LLVM itself.
12+
# The title is not semantically significant, but use to create folders in
13+
# CMake-generated IDE projects (Visual Studio/XCode).
914
function(get_subproject_title outvar)
1015
if (LLVM_SUBPROJECT_TITLE)
1116
set(${outvar} "${LLVM_SUBPROJECT_TITLE}" PARENT_SCOPE)
1217
else ()
13-
set(cur_rel_dir "${CMAKE_CURRENT_SOURCE_DIR}")
14-
set(topdir "${CMAKE_SOURCE_DIR}/..")
15-
cmake_path(NORMAL_PATH topdir)
16-
cmake_path(RELATIVE_PATH cur_rel_dir BASE_DIRECTORY "${topdir}" )
17-
string(REGEX REPLACE "/.*" "" cur_rel_topdir "${cur_rel_dir}")
18-
19-
set(subproject_title "Unknown ${cur_rel_topdir}")
20-
if (cur_rel_topdir STREQUAL "llvm")
21-
set(subproject_title "LLVM")
22-
#elseif (cur_rel_topdir STREQUAL "clang")
23-
# set(subproject_title "Clang")
24-
#elseif (cur_rel_topdir STREQUAL "mlir")
25-
# set(subproject_title "MLIR")
26-
#elseif (cur_rel_topdir STREQUAL "clang-tools-extra")
27-
# set(subproject_title "Clang Tools Extra")
28-
#elseif (cur_rel_topdir STREQUAL "flang")
29-
# set(subproject_title "Flang")
30-
#elseif (cur_rel_topdir STREQUAL "polly")
31-
# set(subproject_title "Polly")
32-
#elseif (cur_rel_topdir STREQUAL "cross-project-tests")
33-
# set(subproject_title "Cross-Project")
34-
#elseif (cur_rel_topdir STREQUAL "bolt")
35-
# set(subproject_title "BOLT")
36-
#elseif (cur_rel_topdir STREQUAL "lld")
37-
# set(subproject_title "LLD")
38-
#elseif (cur_rel_topdir STREQUAL "lldb")
39-
# set(subproject_title "LLDB")
40-
#elseif (cur_rel_topdir STREQUAL "libclc")
41-
# set(subproject_title "libclc")
42-
#elseif (cur_rel_topdir STREQUAL "openmp")
43-
# set(subproject_title "OpenMP")
44-
#elseif (cur_rel_topdir STREQUAL "compiler-rt")
45-
# set(subproject_title "Compiler-RT")
46-
else ()
47-
message(WARNING "Unknown subproject: ${cur_rel_topdir}")
48-
endif ()
49-
50-
set(${outvar} "${subproject_title}" PARENT_SCOPE)
18+
set(${outvar} "LLVM" PARENT_SCOPE)
5119
endif ()
5220
endfunction(get_subproject_title)
5321

llvm/cmake/modules/LLVMExternalProjectUtils.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,10 @@ function(llvm_ExternalProject_Add name source_dir)
369369
LIST_SEPARATOR |
370370
)
371371
if (ARG_FOLDER)
372-
set_target_properties(${name} ${name}-clobber PROPERTIES FOLDER "${ARG_FOLDER}")
372+
set_target_properties(
373+
${name} ${name}-clobber ${name}-build ${name}-configure
374+
PROPERTIES FOLDER "${ARG_FOLDER}"
375+
)
373376
endif ()
374377

375378
if(ARG_USE_TOOLCHAIN)

pstl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ 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")
1213

1314
list(INSERT CMAKE_MODULE_PATH 0
1415
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"

0 commit comments

Comments
 (0)