[BOLT] Revise IDE folder structure (#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.
This commit is contained in:
parent
9da81cee21
commit
c5a3f664fe
@ -1,3 +1,5 @@
|
||||
set(LLVM_SUBPROJECT_TITLE "BOLT")
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
set(BOLT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
@ -121,7 +123,7 @@ option(BOLT_BUILD_TOOLS
|
||||
"Build the BOLT tools. If OFF, just generate build targets." ON)
|
||||
|
||||
add_custom_target(bolt)
|
||||
set_target_properties(bolt PROPERTIES FOLDER "BOLT")
|
||||
set_target_properties(bolt PROPERTIES FOLDER "BOLT/Metatargets")
|
||||
add_llvm_install_targets(install-bolt DEPENDS bolt COMPONENT bolt)
|
||||
|
||||
include_directories(
|
||||
|
@ -3,7 +3,6 @@ include(LLVMDistributionSupport)
|
||||
|
||||
macro(add_bolt_executable name)
|
||||
add_llvm_executable(${name} ${ARGN})
|
||||
set_target_properties(${name} PROPERTIES FOLDER "BOLT")
|
||||
endmacro()
|
||||
|
||||
macro(add_bolt_tool name)
|
||||
|
@ -79,6 +79,7 @@ if (LLVM_ENABLE_DOXYGEN)
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating bolt doxygen documentation." VERBATIM)
|
||||
set_target_properties(doxygen-bolt PROPERTIES FOLDER "BOLT/Docs")
|
||||
|
||||
if (LLVM_BUILD_DOCS)
|
||||
add_dependencies(doxygen doxygen-bolt)
|
||||
|
@ -56,7 +56,7 @@ list(APPEND BOLT_TEST_DEPS
|
||||
)
|
||||
|
||||
add_custom_target(bolt-test-depends DEPENDS ${BOLT_TEST_DEPS})
|
||||
set_target_properties(bolt-test-depends PROPERTIES FOLDER "BOLT")
|
||||
set_target_properties(bolt-test-depends PROPERTIES FOLDER "BOLT/Tests")
|
||||
|
||||
add_lit_testsuite(check-bolt "Running the BOLT regression tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
@ -64,7 +64,6 @@ add_lit_testsuite(check-bolt "Running the BOLT regression tests"
|
||||
DEPENDS ${BOLT_TEST_DEPS}
|
||||
ARGS ${BOLT_TEST_EXTRA_ARGS}
|
||||
)
|
||||
set_target_properties(check-bolt PROPERTIES FOLDER "BOLT")
|
||||
|
||||
add_lit_testsuites(BOLT ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PARAMS ${BOLT_TEST_PARAMS}
|
||||
|
@ -1,5 +1,5 @@
|
||||
add_custom_target(BoltUnitTests)
|
||||
set_target_properties(BoltUnitTests PROPERTIES FOLDER "BOLT tests")
|
||||
set_target_properties(BoltUnitTests PROPERTIES FOLDER "BOLT/Tests")
|
||||
|
||||
function(add_bolt_unittest test_dirname)
|
||||
add_unittest(BoltUnitTests ${test_dirname} ${ARGN})
|
||||
|
Loading…
x
Reference in New Issue
Block a user