浏览代码

ENH: fix check for intel windows module mangling

Bill Hoffman 17 年之前
父节点
当前提交
c0e7bcd4ae
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Modules/FortranCInterface.cmake

+ 5 - 1
Modules/FortranCInterface.cmake

@@ -93,7 +93,11 @@ function(discover_fortran_module_mangling prefix suffix found)
     test_fortran_mangling("${CODE}" "${interface}"
       ${FORTRAN_C_MANGLING_UPPERCASE} "" "module" "sub" worked)
     if(worked)
-      string(TOLOWER "${interface}" interface)
+      # if this is the upper case module match then
+      # lower case it for the extraction of pre and post strings
+      if("${interface}" MATCHES "TEST_INTERFACE")
+        string(TOLOWER "${interface}" interface)
+      endif()
       string(REGEX REPLACE "(.*)test_interface(.*)" "\\1" pre "${interface}")
       string(REGEX REPLACE "(.*)test_interface(.*)" "\\2" post "${interface}")
       set(${prefix} "${pre}" PARENT_SCOPE)