[PATCH] D29931: [Cmake] Install the isl headers into the install tree

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 03:52:26 PST 2017


philip.pfaffe created this revision.
philip.pfaffe added a project: Polly.
Herald added a subscriber: mgorny.

isl headers are currently missing in a Polly installation. Because the Polly headers depend on those, code can't be compiled against an installed Polly.

This patch installs the isl headers. I left a TODO, as optionally it should be possible to use a system version of isl instead of the one shipped with Polly.

When compiling, clients of the installation need to add -I${PREFIX}/include/polly/ to there include path right now, because there currently is no way to export this path automatically.


https://reviews.llvm.org/D29931

Files:
  lib/External/CMakeLists.txt


Index: lib/External/CMakeLists.txt
===================================================================
--- lib/External/CMakeLists.txt
+++ lib/External/CMakeLists.txt
@@ -262,6 +262,22 @@
   ${ISL_FILES}
 )
 
+
+# TODO: use system isl instead
+if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+  set(POLLY_ISL_HEADER_PREFIX "include/polly" CACHE STRING
+    "Install prefix for the isl headers")
+  mark_as_advanced(POLLY_ISL_HEADER_PREFIX)
+
+  install(DIRECTORY ${ISL_SOURCE_DIR}/include/
+    DESTINATION ${POLLY_ISL_HEADER_PREFIX}
+    FILES_MATCHING
+    PATTERN "*.h"
+    PATTERN "CMakeFiles" EXCLUDE
+    PATTERN ".svn" EXCLUDE
+    )
+endif()
+
 add_executable(polly-isl-test
   isl/isl_test.c
 )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29931.88344.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170214/7067f3f0/attachment.bin>


More information about the llvm-commits mailing list