diff options
author | Brad King <brad.king@kitware.com> | 2009-10-29 14:06:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-29 14:06:10 (GMT) |
commit | 537906b467c06cb927af3fe855d05bf57bb5350d (patch) | |
tree | 73e75cdb7dbb9a44210899a0deb74ab015d8c65c /Modules/Platform | |
parent | 5075c255f7b2c5a2625a9f48f5f4948675c29f6b (diff) | |
download | CMake-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.cmake | 6 |
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") |