diff --git a/Fortran/gfortran/CMakeLists.txt b/Fortran/gfortran/CMakeLists.txt --- a/Fortran/gfortran/CMakeLists.txt +++ b/Fortran/gfortran/CMakeLists.txt @@ -342,6 +342,10 @@ # other diagnostics, it will be empty. set(out ${target}.out) + # CMake escapes spaces. To really get a space (between arguments) use a ; + string(REPLACE " " ";" env_fflags ${CMAKE_Fortran_FLAGS}) + string(APPEND fflags env_fflags) + add_custom_command( OUTPUT ${out} COMMAND ${CMAKE_COMMAND}