summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
authorChristopher Tetreault <ctetreau@quicinc.com>2020-01-07 14:15:07 -0600
committerMichael Kruse <llvm-project@meinersbur.de>2020-01-07 14:20:06 -0600
commit76ee0de00c407399b0aa7d282c589739b818b3dc (patch)
tree92d5c47c65032e8cf508cecec41febc92a3540c5 /polly/lib
parent449ab1050977e0a5a1757552f13ca1329a7238f5 (diff)
downloadbcm5719-llvm-76ee0de00c407399b0aa7d282c589739b818b3dc.tar.gz
bcm5719-llvm-76ee0de00c407399b0aa7d282c589739b818b3dc.zip
[cmake] Use source-groups in Polly.
Configure CMake to setup source-groups for Polly. Source groups describe how source files should be organized in IDEs. By default, all headers are dumped into one folder under PollyCore and all source files into another. On disk, these files are organized into folders, but this isn't reflected in the IDE. This change uses CMake source groups to have the IDE reflect the on disk layout. This will make it easier to visualize the project structure for users of Visual Studio and XCode Patch by Christopher Tetreault <ctetreau@quicinc.com> Reviewed By: Meinersbur, grosser Differential Revision: https://reviews.llvm.org/D72117
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt
index e76d6039ad5..9e8cd1906d6 100644
--- a/polly/lib/CMakeLists.txt
+++ b/polly/lib/CMakeLists.txt
@@ -73,6 +73,17 @@ add_llvm_pass_plugin(Polly
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
+ # will be a source and include folder. In the source folder will be all the
+ # source files in a flat list, and in the include folder will be all the
+ # headers in a flat list. Sets the CMake source_group for each folder such
+ # the organization of the sources and headers in the IDE matches how it is
+ # laid out on disk
+ setup_polly_source_groups(${CMAKE_CURRENT_LIST_DIR}
+ ${CMAKE_CURRENT_LIST_DIR}/../include/polly)
+endif()
+
# Create the library that can be linked into LLVM's tools and Polly's unittests.
# It depends on all library it needs, such that with
# LLVM_POLLY_LINK_INTO_TOOLS=ON, its dependencies like PollyISL are linked as
OpenPOWER on IntegriCloud