summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-12 13:35:50 +0000
committerKitware Robot <kwrobot@kitware.com>2022-09-12 09:36:06 -0400
commit20f36aae147dc2fe16d0634df2be4cb2c4c40f62 (patch)
tree0407eb8d639647af8a7ec74803e1ac0fc4c30258 /Modules
parent31e832133ae6af0872854bdb2765fab93919139b (diff)
parent0f5b6dd215439304f701284390127469dcf64ccb (diff)
downloadcmake-20f36aae147dc2fe16d0634df2be4cb2c4c40f62.tar.gz
Merge topic 'FortranCInterface-LLVMFlang' into release-3.24
0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7658
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FortranCInterface/CMakeLists.txt2
-rw-r--r--Modules/FortranCInterface/Detect.cmake6
2 files changed, 5 insertions, 3 deletions
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt
index fb35ff0a6d..4bd7006efb 100644
--- a/Modules/FortranCInterface/CMakeLists.txt
+++ b/Modules/FortranCInterface/CMakeLists.txt
@@ -43,6 +43,8 @@ set(module_symbols
MYMODULE_mp_MYSUB # Intel on Windows
mymodule_mysub_ # PGI
mymodule_MP_mysub # NAG
+ _QMmy_modulePmy_sub # LLVMFlang
+ _QMmymodulePmysub # LLVMFlang
${FortranCInterface_MODULE_SYMBOLS}
)
list(REMOVE_DUPLICATES module_symbols)
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake
index 72e5544907..567fc3727c 100644
--- a/Modules/FortranCInterface/Detect.cmake
+++ b/Modules/FortranCInterface/Detect.cmake
@@ -95,8 +95,8 @@ set(_case_MYSUB "UPPER")
set(_case_MY_SUB "UPPER")
set(_global_regex "^(_*)(mysub|MYSUB)([_$]*)$")
set(_global__regex "^(_*)(my_sub|MY_SUB)([_$]*)$")
-set(_module_regex "^(_*)(mymodule|MYMODULE)([A-Za-z_$]*)(mysub|MYSUB)([_$]*)$")
-set(_module__regex "^(_*)(my_module|MY_MODULE)([A-Za-z_$]*)(my_sub|MY_SUB)([_$]*)$")
+set(_module_regex "^(_*)([A-Za-z$]*)(mymodule|MYMODULE)([A-Za-z_$]*)(mysub|MYSUB)([_$]*)$")
+set(_module__regex "^(_*)([A-Za-z$]*)(my_module|MY_MODULE)([A-Za-z_$]*)(my_sub|MY_SUB)([_$]*)$")
# Parse the symbol names.
foreach(symbol ${FortranCInterface_SYMBOLS})
@@ -115,7 +115,7 @@ foreach(symbol ${FortranCInterface_SYMBOLS})
# Look for module symbols.
string(REGEX REPLACE "${_module_${form}regex}"
- "\\1;\\2;\\3;\\4;\\5" pieces "${symbol}")
+ "\\1\\2;\\3;\\4;\\5;\\6" pieces "${symbol}")
list(LENGTH pieces len)
if(len EQUAL 5)
set(FortranCInterface_MODULE_${form}SYMBOL "${symbol}")