fix PR13550: add a cmake WITH_POLLY option
[oota-llvm.git] / tools / CMakeLists.txt
index 12e10fd0bbd1cbfe9cb6aac262a1532e001d8562..78a0b42babce6b9259e68b7cee4b39dde8e90513 100644 (file)
@@ -1,7 +1,3 @@
-# NOTE: The tools are organized into groups of four consisting of one large and
-# three small executables. This is done to minimize memory load in parallel
-# builds.  Please retain this ordering.
-
 add_llvm_tool_subdirectory(llvm-config)
 
 add_llvm_tool_subdirectory(opt)
@@ -15,6 +11,7 @@ add_llvm_tool_subdirectory(llvm-nm)
 add_llvm_tool_subdirectory(llvm-size)
 
 add_llvm_tool_subdirectory(llvm-cov)
+add_llvm_tool_subdirectory(llvm-profdata)
 add_llvm_tool_subdirectory(llvm-link)
 add_llvm_tool_subdirectory(lli)
 
@@ -69,7 +66,12 @@ add_llvm_external_project(clang)
 if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
   add_llvm_external_project(lld)
   add_llvm_external_project(lldb)
-  add_llvm_external_project(polly)
+
+  if(WITH_POLLY)
+    add_llvm_external_project(polly)
+  else(WITH_POLLY)
+    list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/polly")
+  endif(WITH_POLLY)
 
   # Automatically add remaining sub-directories containing a 'CMakeLists.txt'
   # file as external projects.