From 537906b467c06cb927af3fe855d05bf57bb5350d Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 29 Oct 2009 10:06:10 -0400 Subject: Fix flags for Intel Fortran on Windows We replace "/MD" with ifort-specific flags as follows: /MD -> /threads /libs:dll /MDd -> /threads /libs:dll /dbglibs We also enable the "/MD" equivalent for all Fortran configurations. Previously multithreaded dll runtimes were used for release builds and threaded static runtimes for debug builds. For mixed Fortran C/C++ projects, this led to link warnings for Debug but not for Release. See issue #8744. --- Modules/Platform/Windows-ifort.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Platform/Windows-ifort.cmake b/Modules/Platform/Windows-ifort.cmake index c9624b5..6cffed9 100644 --- a/Modules/Platform/Windows-ifort.cmake +++ b/Modules/Platform/Windows-ifort.cmake @@ -53,10 +53,10 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visu # does the compiler support pdbtype and is it the newer compiler SET(CMAKE_BUILD_TYPE_INIT Debug) -SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp") -SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full") +SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads") +SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full /dbglibs") SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O2 /D NDEBUG") -SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/MD /O1 /D NDEBUG") +SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O1 /D NDEBUG") SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O1 /debug:full /D NDEBUG") SET (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib") -- cgit v0.12