diff options
author | Brad King <brad.king@kitware.com> | 2010-12-16 14:33:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-16 14:33:06 (GMT) |
commit | 58c73c43f62d581f62d694f5d144a021b9832284 (patch) | |
tree | fb7eec1e6a831116437668944bb9c4c92a5f904d /Modules/Platform | |
parent | 3fb088e521584dfed27513faf556b8b0d6cc73d3 (diff) | |
download | CMake-58c73c43f62d581f62d694f5d144a021b9832284.zip CMake-58c73c43f62d581f62d694f5d144a021b9832284.tar.gz CMake-58c73c43f62d581f62d694f5d144a021b9832284.tar.bz2 |
Detect Fortran target architecture on Windows
Commit 4430bccc (Change the way 32/64 bit compiles are detected with
MSVC and intel, 2009-11-19) added detection of the target processor to C
and CXX language builds with MS and Intel tools. Do the same for Intel
Fortran for Windows (ifort). Use /machine:<arch> to link executables.
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-ifort.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-ifort.cmake b/Modules/Platform/Windows-ifort.cmake index 6cffed9..1fd734e 100644 --- a/Modules/Platform/Windows-ifort.cmake +++ b/Modules/Platform/Windows-ifort.cmake @@ -63,7 +63,10 @@ SET (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib") # executable linker flags SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:") -SET (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES") +IF(NOT _MACHINE_ARCH_FLAG) + SET(_MACHINE_ARCH_FLAG ${MSVC_Fortran_ARCHITECTURE_ID}) +ENDIF(NOT _MACHINE_ARCH_FLAG) +SET (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES /machine:${_MACHINE_ARCH_FLAG}") IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE) SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept") SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept") |