summaryrefslogtreecommitdiffstats
path: root/Modules/FortranCInterface
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-02-16 18:24:44 (GMT)
committerBrad King <brad.king@kitware.com>2010-02-16 18:24:44 (GMT)
commit4685872078f71705c53c19d79121bd9d76b83265 (patch)
treebe3615b6962c8dc821c4bdffb026d8e1bb1e036f /Modules/FortranCInterface
parent71e4fe7c7eecaef06ba17bf52f6668080bbe1cdc (diff)
downloadCMake-4685872078f71705c53c19d79121bd9d76b83265.zip
CMake-4685872078f71705c53c19d79121bd9d76b83265.tar.gz
CMake-4685872078f71705c53c19d79121bd9d76b83265.tar.bz2
FortranCInterface: Fix PathScale detection again
PathScale Fortran mangles module symbols as "MY_SUB.in.MY_MODULE" and also requires "my_module_" when the module is imported. We cannot provide the symbol with ".in." mangling so we should not provide "my_module_" because it would duplicate the one in the Fortran-provided object file. Commit "FortranCInterface: Fix PathScale detection" (2010-01-22) already made the same fix for the non-underscore module case.
Diffstat (limited to 'Modules/FortranCInterface')
-rw-r--r--Modules/FortranCInterface/my_module_.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/FortranCInterface/my_module_.c b/Modules/FortranCInterface/my_module_.c
index 0d7091f..364b214 100644
--- a/Modules/FortranCInterface/my_module_.c
+++ b/Modules/FortranCInterface/my_module_.c
@@ -1,2 +1,8 @@
+#if defined(__PATHSCALE__)
+/* PathScale Fortran wants my_module_ when calling any my_module symbol,
+ but module symbols use '.in.' so we cannot provide them anyway. */
+void pathscale_my_module_(void) {}
+#else
/* PGI Fortran wants my_module_ when calling any my_module symbol. */
void my_module_(void) {}
+#endif