From: Augustin Degomme Date: Sun, 27 Oct 2019 14:47:29 +0000 (+0100) Subject: second attempt. Remove -g flag for flang from now, it's not really useful for our... X-Git-Tag: v3.25~478 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/120cfc8a36583c457a43519922e5006bd6a891b3 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) --- 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")