summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-29 14:06:10 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-29 14:06:10 (GMT)
commit537906b467c06cb927af3fe855d05bf57bb5350d (patch)
tree73e75cdb7dbb9a44210899a0deb74ab015d8c65c /Modules/Platform
parent5075c255f7b2c5a2625a9f48f5f4948675c29f6b (diff)
downloadCMake-537906b467c06cb927af3fe855d05bf57bb5350d.zip
CMake-537906b467c06cb927af3fe855d05bf57bb5350d.tar.gz
CMake-537906b467c06cb927af3fe855d05bf57bb5350d.tar.bz2
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.
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Windows-ifort.cmake6
1 files 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")