From 098130fa403a82f2a425761bbccdede022fac3ff Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sat, 5 Sep 2020 18:15:32 +0300 Subject: [PATCH] [CMake][Polly] Remove dead CMake code LLVM requires CMake 3.13.4 so remove code behind checks for an older version. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D87192 --- polly/cmake/polly_macros.cmake | 15 --------------- polly/lib/External/CMakeLists.txt | 3 +-- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/polly/cmake/polly_macros.cmake b/polly/cmake/polly_macros.cmake index 86de6f10686e..518a09b45a42 100644 --- a/polly/cmake/polly_macros.cmake +++ b/polly/cmake/polly_macros.cmake @@ -72,21 +72,6 @@ macro(add_polly_loadable_module name) 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 diff --git a/polly/lib/External/CMakeLists.txt b/polly/lib/External/CMakeLists.txt index 1039079cb49c..c953ea48475d 100644 --- a/polly/lib/External/CMakeLists.txt +++ b/polly/lib/External/CMakeLists.txt @@ -293,8 +293,7 @@ if (POLLY_BUNDLED_ISL) ) # 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_property(TARGET PollyISL polly-isl-test PROPERTY C_STANDARD 99) endif (POLLY_BUNDLED_ISL) set(PET_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pet")