diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03dd738bdafb7a08db2bbc2fa93f4a957c0dc630..8645a1b65771e7f04a477573ae339e0000bb84fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1041,7 +1041,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
     string(REGEX MATCH ".*ifort$" _match_ifort ${CMAKE_Fortran_COMPILER})
     if(_match_ifort)
         message(STATUS "Add -nofor_main to the Fortran linker (Intel compiler)")
-        list(APPEND CMAKE_Fortran_FLAGS "-nofor_main")
+        set(CMAKE_Fortran_FLAGS  "${CMAKE_Fortran_FLAGS} -nofor_main")
     endif(_match_ifort)
 
     # Testing executables