Windows-df.cmake 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # compiler support for fortran CVF compiler on windows
  2. set(CMAKE_WINDOWS_OBJECT_PATH 1)
  3. set(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
  4. set(CMAKE_LINK_LIBRARY_FLAG "")
  5. set(WIN32 1)
  6. if(CMAKE_VERBOSE_MAKEFILE)
  7. set(CMAKE_CL_NOLOGO)
  8. else()
  9. set(CMAKE_CL_NOLOGO "/nologo")
  10. endif()
  11. set(CMAKE_Fortran_MODDIR_FLAG "-module:")
  12. set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
  13. "link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
  14. set(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
  15. # create a C++ static library
  16. set(CMAKE_Fortran_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
  17. # compile a C++ file into an object file
  18. set(CMAKE_Fortran_COMPILE_OBJECT
  19. "<CMAKE_Fortran_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /object:<OBJECT> <FLAGS> /compile_only <SOURCE>${CMAKE_END_TEMP_FILE}")
  20. set(CMAKE_Fortran_LINK_EXECUTABLE
  21. "<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}")
  22. set(CMAKE_CREATE_WIN32_EXE /winapp)
  23. set(CMAKE_CREATE_CONSOLE_EXE )
  24. # does the compiler support pdbtype and is it the newer compiler
  25. set(CMAKE_BUILD_TYPE_INIT Debug)
  26. set (CMAKE_Fortran_FLAGS_INIT "")
  27. set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full")
  28. set (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/Optimize:2 /Define:NDEBUG")
  29. set (CMAKE_Fortran_FLAGS_RELEASE_INIT "/Optimize:1 /Define:NDEBUG")
  30. set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/Optimize:1 /debug:full /Define:NDEBUG")
  31. set (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
  32. # executable linker flags
  33. set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
  34. set (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES")
  35. if (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
  36. set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept")
  37. set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept")
  38. else ()
  39. set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
  40. set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
  41. endif ()
  42. set (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
  43. set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
  44. set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
  45. set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
  46. set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
  47. set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})