diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c490dcd..b801bb9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,16 +1,20 @@ include("list_of_files.cmake") if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") - set(CMAKE_Fortran_FLAGS "-g -auto -convert big_endian -assume byterecl -fp-model strict -fpp") + set(CMAKE_Fortran_FLAGS "-g -auto -convert big_endian -assume byterecl -fp-model strict -fpp ${CMAKE_Fortran_FLAGS}") set(fortran_d_flags "-r8") set(fortran_8_flags "-i8 -r8") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") - set(CMAKE_Fortran_FLAGS "-g -fconvert=big-endian -cpp") + set(CMAKE_Fortran_FLAGS "-g -fconvert=big-endian -cpp ${CMAKE_Fortran_FLAGS}") set(CMAKE_Fortran_FLAGS_DEBUG "-ggdb -Wall") set(fortran_d_flags "-fdefault-real-8") set(fortran_8_flags "-fdefault-integer-8 -fdefault-real-8") endif() +if(${CMAKE_Fortran_COMPILER_ID} MATCHES "^(GNU)$" AND ${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -w -fallow-argument-mismatch -fallow-invalid-boz") +endif() + set(kinds "4" "8" "d") foreach(kind ${kinds}) set(lib_name ${PROJECT_NAME}_${kind})