Updated formatting of documentation plus a little reorganization.
[cmake.git] / Modules / Platform / Windows-ifort.cmake
blob01848a6011f2bb93178587d0b40a8ede164abecb
1 SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
2 SET(CMAKE_LINK_LIBRARY_FLAG "")
3 SET(WIN32 1)
4 IF(CMAKE_VERBOSE_MAKEFILE)
5   SET(CMAKE_CL_NOLOGO)
6 ELSE(CMAKE_VERBOSE_MAKEFILE)
7   SET(CMAKE_CL_NOLOGO "/nologo")
8 ENDIF(CMAKE_VERBOSE_MAKEFILE)
10 SET(CMAKE_Fortran_MODDIR_FLAG "-module:")
12 SET(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
14 SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY 
15  "link ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE}  /out:<TARGET> /dll  <LINK_FLAGS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
17 SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
19 # create a C++ static library
20 SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY  "lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
22 # compile a C++ file into an object file
23 SET(CMAKE_Fortran_COMPILE_OBJECT
24     "<CMAKE_Fortran_COMPILER>  ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /fpp /Fo<OBJECT> <DEFINES> <FLAGS> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
26 SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
28 SET(CMAKE_Fortran_LINK_EXECUTABLE
29   "<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> -link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
31 INCLUDE(Platform/Windows-Intel)
33 IF(_INTEL_COMPILER_SUPPORTS_MANIFEST)
34     SET(CMAKE_Fortran_LINK_EXECUTABLE
35       "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_Fortran_LINK_EXECUTABLE}")
36   SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
37     "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_Fortran_CREATE_SHARED_LIBRARY}")
38   SET(CMAKE_Fortran_CREATE_SHARED_MODULE
39     "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_Fortran_CREATE_SHARED_MODULE}")
40 ENDIF(_INTEL_COMPILER_SUPPORTS_MANIFEST)
42 SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
43 SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
45 IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
46    SET (CMAKE_NO_BUILD_TYPE 1)
47 ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
48 IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
49   SET (CMAKE_NO_BUILD_TYPE 1)
50   SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING 
51      "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
52 ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
53 # does the compiler support pdbtype and is it the newer compiler
55 SET(CMAKE_BUILD_TYPE_INIT Debug)
56 SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp")
57 SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full")
58 SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O2 /D NDEBUG")
59 SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/MD /O1 /D NDEBUG")
60 SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O1 /debug:full /D NDEBUG")
62 SET (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
64 # executable linker flags
65 SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
66 SET (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES")
67 IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
68   SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept")
69   SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept")
70 ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
71   SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
72   SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
73 ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
75 SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
76 SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
77 SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
78 SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
79 SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
80 SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})