[llvm-branch-commits] [polly] [polly] Revise IDE folder structure (PR #89752)
Michael Kruse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 22 03:09:27 PDT 2024
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/89752
>From a85a17723d76371ccc8feb245c455d6aaf2c297f Mon Sep 17 00:00:00 2001
From: Michael Kruse <llvm-project at meinersbur.de>
Date: Tue, 23 Apr 2024 13:19:16 +0200
Subject: [PATCH 1/3] [polly] Revise IDE folder structure
---
polly/CMakeLists.txt | 5 +++--
polly/cmake/polly_macros.cmake | 2 +-
polly/docs/CMakeLists.txt | 1 +
polly/lib/CMakeLists.txt | 4 +---
polly/test/CMakeLists.txt | 7 ++-----
polly/unittests/CMakeLists.txt | 2 +-
6 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt
index 5d0f2cd7f00ec..a0d1ab49e7837 100644
--- a/polly/CMakeLists.txt
+++ b/polly/CMakeLists.txt
@@ -4,6 +4,7 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
cmake_minimum_required(VERSION 3.20.0)
set(POLLY_STANDALONE_BUILD TRUE)
endif()
+set(LLVM_SUBPROJECT_TITLE "Polly")
# Must go below project(..)
include(GNUInstallDirs)
@@ -157,8 +158,8 @@ foreach (file IN LISTS files)
endforeach ()
add_custom_target(polly-check-format DEPENDS ${check_format_depends})
-set_target_properties(polly-check-format PROPERTIES FOLDER "Polly")
+set_target_properties(polly-check-format PROPERTIES FOLDER "Polly/Meta")
add_custom_target(polly-update-format DEPENDS ${update_format_depends})
-set_target_properties(polly-update-format PROPERTIES FOLDER "Polly")
+set_target_properties(polly-update-format PROPERTIES FOLDER "Polly/Meta")
diff --git a/polly/cmake/polly_macros.cmake b/polly/cmake/polly_macros.cmake
index df541eeccc4cb..b1bd1e1b03cda 100644
--- a/polly/cmake/polly_macros.cmake
+++ b/polly/cmake/polly_macros.cmake
@@ -21,7 +21,7 @@ macro(add_polly_library name)
set(libkind)
endif()
add_library( ${name} ${libkind} ${srcs} )
- set_target_properties(${name} PROPERTIES FOLDER "Polly")
+ set_target_properties(${name} PROPERTIES FOLDER "Polly/Libraries")
if( LLVM_COMMON_DEPENDS )
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
diff --git a/polly/docs/CMakeLists.txt b/polly/docs/CMakeLists.txt
index a1ef5ce5277f7..2bd16e53c542f 100644
--- a/polly/docs/CMakeLists.txt
+++ b/polly/docs/CMakeLists.txt
@@ -77,6 +77,7 @@ if (LLVM_ENABLE_DOXYGEN)
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating polly doxygen documentation." VERBATIM)
+ set_target_properties(doxygen-polly PROPERTIES FOLDER "Polly/Docs")
if (LLVM_BUILD_DOCS)
add_dependencies(doxygen doxygen-polly)
diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt
index 4557878e515e6..f18cdcd09cfca 100644
--- a/polly/lib/CMakeLists.txt
+++ b/polly/lib/CMakeLists.txt
@@ -92,8 +92,6 @@ add_llvm_pass_plugin(Polly
LINK_COMPONENTS
${POLLY_COMPONENTS}
)
-set_target_properties(obj.Polly PROPERTIES FOLDER "Polly")
-set_target_properties(Polly PROPERTIES FOLDER "Polly")
if (MSVC_IDE OR XCODE)
# Configure source groups for Polly source files. By default, in the IDE there
@@ -120,7 +118,7 @@ if (WIN32 OR CYGWIN OR NOT LLVM_ENABLE_PIC)
# Add dummy target, either because loadable modules are not supported
# as on Windows or because PIC code has been disabled
add_custom_target(LLVMPolly)
- set_target_properties(LLVMPolly PROPERTIES FOLDER "Polly")
+ set_target_properties(LLVMPolly PROPERTIES FOLDER "Polly/Meta")
else ()
add_polly_loadable_module(LLVMPolly
Plugin/Polly.cpp
diff --git a/polly/test/CMakeLists.txt b/polly/test/CMakeLists.txt
index 81cee34a780d6..338c7dbfa1158 100644
--- a/polly/test/CMakeLists.txt
+++ b/polly/test/CMakeLists.txt
@@ -1,7 +1,7 @@
set(LLVM_SHLIBEXT "${CMAKE_SHARED_MODULE_SUFFIX}")
add_custom_target(check-polly)
-set_target_properties(check-polly PROPERTIES FOLDER "Polly")
+set_target_properties(check-polly PROPERTIES FOLDER "Polly/Tests")
if(NOT LLVM_MAIN_SRC_DIR)
find_program(LLVM_OPT NAMES opt HINTS ${LLVM_TOOLS_BINARY_DIR})
@@ -64,7 +64,6 @@ add_lit_testsuite(check-polly-tests "Running polly regression tests"
polly_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
DEPENDS ${POLLY_TEST_DEPS}
)
-set_target_properties(check-polly-tests PROPERTIES FOLDER "Polly")
add_dependencies(check-polly check-polly-tests)
configure_lit_site_cfg(
@@ -80,7 +79,6 @@ if (POLLY_GTEST_AVAIL)
EXCLUDE_FROM_CHECK_ALL
DEPENDS PollyUnitTests
)
- set_target_properties(check-polly-unittests PROPERTIES FOLDER "Polly")
endif ()
configure_file(
@@ -94,7 +92,6 @@ if (POLLY_BUNDLED_ISL)
EXCLUDE_FROM_CHECK_ALL
DEPENDS polly-isl-test
)
- set_target_properties(check-polly-isl PROPERTIES FOLDER "Polly")
endif (POLLY_BUNDLED_ISL)
# Run polly-check-format as part of polly-check only if we are compiling with
@@ -114,5 +111,5 @@ configure_file(
# Add a legacy target spelling: polly-test
add_custom_target(polly-test)
-set_target_properties(polly-test PROPERTIES FOLDER "Polly")
+set_target_properties(polly-test PROPERTIES FOLDER "Polly/Tests")
add_dependencies(polly-test check-polly)
diff --git a/polly/unittests/CMakeLists.txt b/polly/unittests/CMakeLists.txt
index 94b75449c3022..58dd5991043e2 100644
--- a/polly/unittests/CMakeLists.txt
+++ b/polly/unittests/CMakeLists.txt
@@ -14,7 +14,7 @@ function(add_polly_unittest test_name)
target_link_libraries(${test_name} PRIVATE gtest_main gtest)
add_dependencies(PollyUnitTests ${test_name})
- set_property(TARGET ${test_name} PROPERTY FOLDER "Polly")
+ set_property(TARGET ${test_name} PROPERTY FOLDER "Polly/Tests/Unittests")
endif()
if(LLVM_LINK_LLVM_DYLIB AND LLVM_POLLY_LINK_INTO_TOOLS)
>From d30b278d9e0fbb93f5ee2ec00c824711b9ceddc0 Mon Sep 17 00:00:00 2001
From: Michael Kruse <llvm-project at meinersbur.de>
Date: Tue, 21 May 2024 22:14:10 +0200
Subject: [PATCH 2/3] Finetune polly folders
---
polly/cmake/polly_macros.cmake | 2 +-
polly/lib/CMakeLists.txt | 2 +-
polly/lib/External/CMakeLists.txt | 2 +-
polly/test/CMakeLists.txt | 4 ++--
polly/unittests/CMakeLists.txt | 5 ++---
5 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/polly/cmake/polly_macros.cmake b/polly/cmake/polly_macros.cmake
index b1bd1e1b03cda..a791be4fa5bc8 100644
--- a/polly/cmake/polly_macros.cmake
+++ b/polly/cmake/polly_macros.cmake
@@ -64,7 +64,7 @@ macro(add_polly_loadable_module name)
endif()
set(MODULE TRUE)
add_polly_library(${name} ${srcs})
- set_target_properties(${name} PROPERTIES FOLDER "Polly")
+ set_target_properties(${name} PROPERTIES FOLDER "Polly/Loadable Modules")
if (GLOBAL_NOT_MODULE)
unset (MODULE)
endif()
diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt
index f18cdcd09cfca..d91f4ecd37e6c 100644
--- a/polly/lib/CMakeLists.txt
+++ b/polly/lib/CMakeLists.txt
@@ -118,7 +118,7 @@ if (WIN32 OR CYGWIN OR NOT LLVM_ENABLE_PIC)
# Add dummy target, either because loadable modules are not supported
# as on Windows or because PIC code has been disabled
add_custom_target(LLVMPolly)
- set_target_properties(LLVMPolly PROPERTIES FOLDER "Polly/Meta")
+ set_target_properties(LLVMPolly PROPERTIES FOLDER "Polly/Loadable Modules")
else ()
add_polly_loadable_module(LLVMPolly
Plugin/Polly.cpp
diff --git a/polly/lib/External/CMakeLists.txt b/polly/lib/External/CMakeLists.txt
index 1869410c8baa5..5dd69b7199dc0 100644
--- a/polly/lib/External/CMakeLists.txt
+++ b/polly/lib/External/CMakeLists.txt
@@ -302,7 +302,7 @@ if (POLLY_BUNDLED_ISL)
add_executable(polly-isl-test
isl/isl_test.c
)
- set_target_properties(polly-isl-test PROPERTIES FOLDER "Polly")
+ set_target_properties(polly-isl-test PROPERTIES FOLDER "Polly/Tests")
target_link_libraries(polly-isl-test PRIVATE
PollyISL
diff --git a/polly/test/CMakeLists.txt b/polly/test/CMakeLists.txt
index 338c7dbfa1158..c2684bebd45eb 100644
--- a/polly/test/CMakeLists.txt
+++ b/polly/test/CMakeLists.txt
@@ -1,7 +1,7 @@
set(LLVM_SHLIBEXT "${CMAKE_SHARED_MODULE_SUFFIX}")
add_custom_target(check-polly)
-set_target_properties(check-polly PROPERTIES FOLDER "Polly/Tests")
+set_target_properties(check-polly PROPERTIES FOLDER "Polly/Meta")
if(NOT LLVM_MAIN_SRC_DIR)
find_program(LLVM_OPT NAMES opt HINTS ${LLVM_TOOLS_BINARY_DIR})
@@ -111,5 +111,5 @@ configure_file(
# Add a legacy target spelling: polly-test
add_custom_target(polly-test)
-set_target_properties(polly-test PROPERTIES FOLDER "Polly/Tests")
+set_target_properties(polly-test PROPERTIES FOLDER "Polly/Meta")
add_dependencies(polly-test check-polly)
diff --git a/polly/unittests/CMakeLists.txt b/polly/unittests/CMakeLists.txt
index 58dd5991043e2..093a2146f63c5 100644
--- a/polly/unittests/CMakeLists.txt
+++ b/polly/unittests/CMakeLists.txt
@@ -1,5 +1,5 @@
add_custom_target(PollyUnitTests)
-set_target_properties(PollyUnitTests PROPERTIES FOLDER "Polly")
+set_target_properties(PollyUnitTests PROPERTIES FOLDER "Polly/Tests")
# add_polly_unittest(test_dirname file1.cpp file2.cpp)
#
@@ -13,9 +13,8 @@ function(add_polly_unittest test_name)
target_link_libraries(${test_name} PRIVATE gtest_main gtest)
add_dependencies(PollyUnitTests ${test_name})
-
- set_property(TARGET ${test_name} PROPERTY FOLDER "Polly/Tests/Unittests")
endif()
+ set_property(TARGET ${test_name} PROPERTY FOLDER "Polly/Tests/Unit")
if(LLVM_LINK_LLVM_DYLIB AND LLVM_POLLY_LINK_INTO_TOOLS)
# In this case Polly is already present in libLLVM,
>From 28238ddb3ef106cc0d8653fe7c1e288c50237039 Mon Sep 17 00:00:00 2001
From: Michael Kruse <llvm-project at meinersbur.de>
Date: Wed, 22 May 2024 12:09:11 +0200
Subject: [PATCH 3/3] Use 'Metatargets' to avoid company name
---
polly/CMakeLists.txt | 5 ++---
polly/test/CMakeLists.txt | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt
index a0d1ab49e7837..b4cfc77d0f213 100644
--- a/polly/CMakeLists.txt
+++ b/polly/CMakeLists.txt
@@ -158,8 +158,7 @@ foreach (file IN LISTS files)
endforeach ()
add_custom_target(polly-check-format DEPENDS ${check_format_depends})
-set_target_properties(polly-check-format PROPERTIES FOLDER "Polly/Meta")
+set_target_properties(polly-check-format PROPERTIES FOLDER "Polly/Metatargets")
add_custom_target(polly-update-format DEPENDS ${update_format_depends})
-set_target_properties(polly-update-format PROPERTIES FOLDER "Polly/Meta")
-
+set_target_properties(polly-update-format PROPERTIES FOLDER "Polly/Metatargets")
diff --git a/polly/test/CMakeLists.txt b/polly/test/CMakeLists.txt
index c2684bebd45eb..4548f01d925a8 100644
--- a/polly/test/CMakeLists.txt
+++ b/polly/test/CMakeLists.txt
@@ -111,5 +111,5 @@ configure_file(
# Add a legacy target spelling: polly-test
add_custom_target(polly-test)
-set_target_properties(polly-test PROPERTIES FOLDER "Polly/Meta")
+set_target_properties(polly-test PROPERTIES FOLDER "Polly/Metatargets")
add_dependencies(polly-test check-polly)
More information about the llvm-branch-commits
mailing list