[Cmake-commits] [cmake-commits] king committed my_module_.c 1.2 1.3

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Feb 16 13:24:46 EST 2010


Update of /cvsroot/CMake/CMake/Modules/FortranCInterface
In directory public:/mounts/ram/cvs-serv22023/Modules/FortranCInterface

Modified Files:
	my_module_.c 
Log Message:
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.


Index: my_module_.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FortranCInterface/my_module_.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** my_module_.c	5 Aug 2009 21:07:36 -0000	1.2
--- my_module_.c	16 Feb 2010 18:24:44 -0000	1.3
***************
*** 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



More information about the Cmake-commits mailing list