Skip to content

Commit c5a3f66

Browse files
authored
[BOLT] Revise IDE folder structure (llvm#89742)
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 9da81ce commit c5a3f66

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

bolt/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
set(LLVM_SUBPROJECT_TITLE "BOLT")
2+
13
include(ExternalProject)
24

35
set(BOLT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
@@ -121,7 +123,7 @@ option(BOLT_BUILD_TOOLS
121123
"Build the BOLT tools. If OFF, just generate build targets." ON)
122124

123125
add_custom_target(bolt)
124-
set_target_properties(bolt PROPERTIES FOLDER "BOLT")
126+
set_target_properties(bolt PROPERTIES FOLDER "BOLT/Metatargets")
125127
add_llvm_install_targets(install-bolt DEPENDS bolt COMPONENT bolt)
126128

127129
include_directories(

bolt/cmake/modules/AddBOLT.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ include(LLVMDistributionSupport)
33

44
macro(add_bolt_executable name)
55
add_llvm_executable(${name} ${ARGN})
6-
set_target_properties(${name} PROPERTIES FOLDER "BOLT")
76
endmacro()
87

98
macro(add_bolt_tool name)

bolt/docs/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ if (LLVM_ENABLE_DOXYGEN)
7979
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
8080
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
8181
COMMENT "Generating bolt doxygen documentation." VERBATIM)
82+
set_target_properties(doxygen-bolt PROPERTIES FOLDER "BOLT/Docs")
8283

8384
if (LLVM_BUILD_DOCS)
8485
add_dependencies(doxygen doxygen-bolt)

bolt/test/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,14 @@ list(APPEND BOLT_TEST_DEPS
5656
)
5757

5858
add_custom_target(bolt-test-depends DEPENDS ${BOLT_TEST_DEPS})
59-
set_target_properties(bolt-test-depends PROPERTIES FOLDER "BOLT")
59+
set_target_properties(bolt-test-depends PROPERTIES FOLDER "BOLT/Tests")
6060

6161
add_lit_testsuite(check-bolt "Running the BOLT regression tests"
6262
${CMAKE_CURRENT_BINARY_DIR}
6363
PARAMS ${BOLT_TEST_PARAMS}
6464
DEPENDS ${BOLT_TEST_DEPS}
6565
ARGS ${BOLT_TEST_EXTRA_ARGS}
6666
)
67-
set_target_properties(check-bolt PROPERTIES FOLDER "BOLT")
6867

6968
add_lit_testsuites(BOLT ${CMAKE_CURRENT_SOURCE_DIR}
7069
PARAMS ${BOLT_TEST_PARAMS}

bolt/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(BoltUnitTests)
2-
set_target_properties(BoltUnitTests PROPERTIES FOLDER "BOLT tests")
2+
set_target_properties(BoltUnitTests PROPERTIES FOLDER "BOLT/Tests")
33

44
function(add_bolt_unittest test_dirname)
55
add_unittest(BoltUnitTests ${test_dirname} ${ARGN})

0 commit comments

Comments
 (0)