[PATCH] D87192: [CMake][Polly] Remove dead CMake code

Raul Tambre via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 5 08:17:05 PDT 2020


tambre created this revision.
tambre added reviewers: compnerd, phosek.
Herald added subscribers: llvm-commits, mgorny.
Herald added a reviewer: bollu.
Herald added a project: LLVM.
tambre requested review of this revision.

LLVM requires CMake 3.13.4 so remove code behind checks for an older version.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87192

Files:
  polly/cmake/polly_macros.cmake
  polly/lib/External/CMakeLists.txt


Index: polly/lib/External/CMakeLists.txt
===================================================================
--- polly/lib/External/CMakeLists.txt
+++ polly/lib/External/CMakeLists.txt
@@ -293,8 +293,8 @@
     )
 
   # ISL requires at least C99 to compile. gcc < 5.0 use -std=gnu89 as default.
-  target_enable_c99(PollyISL)
-  target_enable_c99(polly-isl-test)
+  set_target_properties(PollyISL PROPERTIES C_STANDARD 99)
+  set_target_properties(polly-isl-test PROPERTIES C_STANDARD 99)
 endif (POLLY_BUNDLED_ISL)
 
 set(PET_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pet")
Index: polly/cmake/polly_macros.cmake
===================================================================
--- polly/cmake/polly_macros.cmake
+++ polly/cmake/polly_macros.cmake
@@ -72,21 +72,6 @@
   endif()
 endmacro(add_polly_loadable_module)
 
-# Use C99-compatible compile mode for all C source files of a target.
-function(target_enable_c99 _target)
-  if(CMAKE_VERSION VERSION_GREATER "3.1")
-    set_target_properties("${_target}" PROPERTIES C_STANDARD 99)
-  elseif(CMAKE_COMPILER_IS_GNUCC)
-    get_target_property(_sources "${_target}" SOURCES)
-    foreach(_file IN LISTS _sources)
-      get_source_file_property(_lang "${_file}" LANGUAGE)
-      if(_lang STREQUAL "C")
-        set_source_files_properties(${_file} COMPILE_FLAGS "-std=gnu99")
-      endif()
-    endforeach()
-  endif()
-endfunction()
-
 # Recursive helper for setup_source_group. Traverse the file system and add
 # source files matching the glob_expr to the prefix, recursing into
 # subdirectories as they are encountered


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87192.290091.patch
Type: text/x-patch
Size: 1575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200905/7ded930d/attachment.bin>


More information about the llvm-commits mailing list