diff options
| author | Michael Kruse <llvm-project@meinersbur.de> | 2024-05-25 17:32:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-25 17:32:42 +0200 |
| commit | 064391df493927729fa79fb5b966efba2eb1e170 (patch) | |
| tree | 35c4423aa50551defc0391c1d40e9b8561124285 /mlir/CMakeLists.txt | |
| parent | c3efb57655001896fac955f4d42657db42c836b0 (diff) | |
[mlir] Revise IDE folder structure (#89749)
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.
Diffstat (limited to 'mlir/CMakeLists.txt')
| -rw-r--r-- | mlir/CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt index 9f0b0d68b816..c6d44908a111 100644 --- a/mlir/CMakeLists.txt +++ b/mlir/CMakeLists.txt @@ -1,5 +1,6 @@ # MLIR project. cmake_minimum_required(VERSION 3.20.0) +set(LLVM_SUBPROJECT_TITLE "MLIR") if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) @@ -96,12 +97,13 @@ endif() # tablegen'd targets. # mlir-generic-headers are dialect-independent. add_custom_target(mlir-generic-headers) -set_target_properties(mlir-generic-headers PROPERTIES FOLDER "Misc") +set_target_properties(mlir-generic-headers PROPERTIES FOLDER "MLIR/Resources") # mlir-headers may be dialect-dependent. add_custom_target(mlir-headers) -set_target_properties(mlir-headers PROPERTIES FOLDER "Misc") +set_target_properties(mlir-headers PROPERTIES FOLDER "MLIR/Resources") add_dependencies(mlir-headers mlir-generic-headers) add_custom_target(mlir-doc) +set_target_properties(mlir-doc PROPERTIES FOLDER "MLIR/Docs") # Only enable execution engine if the native target is available. if(${LLVM_NATIVE_ARCH} IN_LIST LLVM_TARGETS_TO_BUILD) @@ -193,6 +195,7 @@ add_subdirectory(lib/CAPI) if (MLIR_INCLUDE_TESTS) add_definitions(-DMLIR_INCLUDE_TESTS) add_custom_target(MLIRUnitTests) + set_target_properties(MLIRUnitTests PROPERTIES FOLDER "MLIR/Tests") if (EXISTS ${LLVM_THIRD_PARTY_DIR}/unittest/googletest/include/gtest/gtest.h) add_subdirectory(unittests) else() @@ -253,7 +256,7 @@ endif() # Custom target to install all mlir libraries add_custom_target(mlir-libraries) -set_target_properties(mlir-libraries PROPERTIES FOLDER "Misc") +set_target_properties(mlir-libraries PROPERTIES FOLDER "MLIR/Metatargets") if (NOT LLVM_ENABLE_IDE) add_llvm_install_targets(install-mlir-libraries |
