2007-02-21 00:43:32 +03:00
|
|
|
# compiler support for fortran CVF compiler on windows
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_WINDOWS_OBJECT_PATH 1)
|
|
|
|
set(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
|
|
|
|
set(CMAKE_LINK_LIBRARY_FLAG "")
|
|
|
|
set(WIN32 1)
|
|
|
|
if(CMAKE_VERBOSE_MAKEFILE)
|
|
|
|
set(CMAKE_CL_NOLOGO)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_CL_NOLOGO "/nologo")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2007-02-21 00:43:32 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_Fortran_MODDIR_FLAG "-module:")
|
2010-09-20 17:53:45 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
2007-02-21 00:43:32 +03:00
|
|
|
"link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
|
2007-02-21 00:43:32 +03:00
|
|
|
|
|
|
|
# create a C++ static library
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_Fortran_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
|
2007-02-21 00:43:32 +03:00
|
|
|
|
|
|
|
# compile a C++ file into an object file
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_Fortran_COMPILE_OBJECT
|
2007-02-21 00:43:32 +03:00
|
|
|
"<CMAKE_Fortran_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /object:<OBJECT> <FLAGS> /compile_only <SOURCE>${CMAKE_END_TEMP_FILE}")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_Fortran_LINK_EXECUTABLE
|
2012-09-27 13:45:25 +04:00
|
|
|
"<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> /exe:<TARGET> <OBJECTS> /link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
|
2007-02-21 00:43:32 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_CREATE_WIN32_EXE /winapp)
|
|
|
|
set(CMAKE_CREATE_CONSOLE_EXE )
|
2007-02-21 00:43:32 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
|
|
|
|
set (CMAKE_NO_BUILD_TYPE 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2007-02-21 00:43:32 +03:00
|
|
|
# does the compiler support pdbtype and is it the newer compiler
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_BUILD_TYPE_INIT Debug)
|
|
|
|
set (CMAKE_Fortran_FLAGS_INIT "")
|
|
|
|
set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full")
|
|
|
|
set (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/Optimize:2 /Define:NDEBUG")
|
|
|
|
set (CMAKE_Fortran_FLAGS_RELEASE_INIT "/Optimize:1 /Define:NDEBUG")
|
|
|
|
set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/Optimize:1 /debug:full /Define:NDEBUG")
|
2007-02-21 00:43:32 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
|
2007-02-21 00:43:32 +03:00
|
|
|
|
|
|
|
# executable linker flags
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
|
|
|
|
set (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES")
|
|
|
|
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")
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
|
|
|
|
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2007-02-21 00:43:32 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
|
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
|
2015-02-03 21:36:37 +03:00
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
|
|
|
|
set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
|
|
|
|
set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
|