From 120cfc8a36583c457a43519922e5006bd6a891b3 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Sun, 27 Oct 2019 15:47:29 +0100 Subject: [PATCH] second attempt. Remove -g flag for flang from now, it's not really useful for our internal builds anyway (only tests are built with these settings) --- tools/cmake/Flags.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index cb7a0c2276..e752365d85 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -49,8 +49,11 @@ if(enable_compile_warnings) if(CMAKE_Fortran_COMPILER_ID MATCHES "GCC|PGI") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall") - endif() - if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") + elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Flang") + # flang >= 7 has a bug with common and debug flags. Ignore cmake-added -g in this case. + # https://github.com/flang-compiler/flang/issues/671 + set(CMAKE_Fortran_FLAGS "-Wall") + elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn all") endif() set(CMAKE_JAVA_COMPILE_FLAGS "-Xlint") -- 2.20.1