[polly] r283547 - [cmake] Unify disabling upstream project warnings.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 05:38:32 PDT 2016
Author: meinersbur
Date: Fri Oct 7 07:38:32 2016
New Revision: 283547
URL: http://llvm.org/viewvc/llvm-project?rev=283547&view=rev
Log:
[cmake] Unify disabling upstream project warnings.
Handle MSVC, ISL and PPCG in one place. The only functional change is that
warnings are also disabled for MSVC compiling PPCG (Which currently fails
anyway).
Modified:
polly/trunk/lib/External/CMakeLists.txt
Modified: polly/trunk/lib/External/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/CMakeLists.txt?rev=283547&r1=283546&r2=283547&view=diff
==============================================================================
--- polly/trunk/lib/External/CMakeLists.txt (original)
+++ polly/trunk/lib/External/CMakeLists.txt Fri Oct 7 07:38:32 2016
@@ -270,33 +270,10 @@ target_link_libraries(polly-isl-test
PollyISL
)
-if (MSVC)
- # Disable common warnings; ideally, they should be fixed upstream
- set(DISABLE_WARNING_FLAGS
- -wd4018 # 'expression' : signed/unsigned mismatch
- -wd4090 # 'operation' : different 'modifier' qualifiers
- -wd4200 # nonstandard extension used: zero-sized array in struct/union
- -wd4201 # nonstandard extension used: nameless struct/union
- -wd4334 # 'operator': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
- )
- target_compile_options(PollyISL PRIVATE ${DISABLE_WARNING_FLAGS})
- target_compile_options(polly-isl-test PRIVATE ${DISABLE_WARNING_FLAGS})
-endif ()
-
# 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)
-# Disable warnings which should be coped with upstream for isl and imath.
-if (NOT MSVC)
- set_target_properties(PollyISL PROPERTIES
- COMPILE_FLAGS "-w"
- )
- set_target_properties(polly-isl-test PROPERTIES
- COMPILE_FLAGS "-w"
- )
-endif ()
-
set(PET_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pet")
set(PPCG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ppcg")
set(PPCG_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppcg")
@@ -345,8 +322,20 @@ add_polly_library(PollyPPCG
target_link_libraries(PollyPPCG PollyISL)
-if (NOT MSVC)
- set_target_properties(PollyPPCG PROPERTIES
+# Disable warnings for upstream projects.
+if (MSVC)
+ set(DISABLE_WARNING_FLAGS
+ -wd4018 # 'expression' : signed/unsigned mismatch
+ -wd4090 # 'operation' : different 'modifier' qualifiers
+ -wd4200 # nonstandard extension used: zero-sized array in struct/union
+ -wd4201 # nonstandard extension used: nameless struct/union
+ -wd4334 # 'operator': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
+ )
+ target_compile_options(PollyISL PRIVATE ${DISABLE_WARNING_FLAGS})
+ target_compile_options(polly-isl-test PRIVATE ${DISABLE_WARNING_FLAGS})
+ target_compile_options(PollyPPCG PRIVATE ${DISABLE_WARNING_FLAGS})
+else ()
+ set_target_properties(PollyISL polly-isl-test PollyPPCG PROPERTIES
COMPILE_FLAGS "-w"
)
endif ()
More information about the llvm-commits
mailing list