override-Fortran.cmake 771 B

123456789101112
  1. set(var "CMAKE_Fortran_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_Embedded")
  2. string(REPLACE "-Z7" "-Z7;-DTEST_Z7" "${var}" "${${var}}")
  3. set(var "CMAKE_Fortran_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_ProgramDatabase")
  4. string(REPLACE "-Zi" "-Zi;-DTEST_Zi" "${var}" "${${var}}")
  5. if(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
  6. set(var "CMAKE_Fortran_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_Embedded")
  7. string(REPLACE "-g" "-g;-DTEST_Z7" "${var}" "${${var}}")
  8. # LLVMFlang does not actually support these, but Windows-LLVMFlang-Fortran pretends it does.
  9. set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_ProgramDatabase "-DTEST_Zi")
  10. set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_EditAndContinue "-DTEST_ZI")
  11. endif()