@@ -25,24 +25,22 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
2525 add_compile_options (/arch:native)
2626 string (APPEND CMAKE_Fortran_FLAGS " /traceback /warn /heap-arrays" )
2727 string (APPEND CMAKE_Fortran_FLAGS_DEBUG " /stand:f18" )
28- string (APPEND CMAKE_Fortran_FLAGS_DEBUG " /debug /check:all" )
28+ string (APPEND CMAKE_Fortran_FLAGS " /debug /check:all" )
2929 else ()
3030 add_compile_options (-march=native)
3131 string (APPEND CMAKE_Fortran_FLAGS " -traceback -warn -heap-arrays" )
3232 string (APPEND CMAKE_Fortran_FLAGS_DEBUG " -stand f18" )
33- string (APPEND CMAKE_Fortran_FLAGS_DEBUG " -debug extended -check all" )
33+ string (APPEND CMAKE_Fortran_FLAGS " -debug extended -check all" )
3434 endif ()
3535elseif (CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
3636 add_compile_options (-mtune=native -Wall)
3737 if (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 8)
3838 string (APPEND CMAKE_Fortran_FLAGS " -std=f2018" )
3939 endif ()
40- if (CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL 9.3.0)
41- string (APPEND CMAKE_Fortran_FLAGS " -Wno-maybe-uninitialized" )
42- endif ()
43- string (APPEND CMAKE_Fortran_FLAGS " -fimplicit-none" )
4440
45- string (APPEND CMAKE_Fortran_FLAGS_DEBUG " -Werror=array-bounds -fcheck=all" )
41+ string (APPEND CMAKE_Fortran_FLAGS " -fimplicit-none" )
42+ string (APPEND CMAKE_Fortran_FLAGS " -Wrealloc-lhs" ) # not -Wrealloc-lhs-all which warns on character
43+ string (APPEND CMAKE_Fortran_FLAGS " -Werror=array-bounds -fcheck=all" )
4644elseif (CMAKE_Fortran_COMPILER_ID STREQUAL PGI)
4745 string (APPEND CMAKE_Fortran_FLAGS " -C -Mdclchk" )
4846elseif (CMAKE_Fortran_COMPILER_ID STREQUAL NAG)
0 commit comments