[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.7 1.8 mymodule_.c 1.2 1.3

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Jan 22 14:15:51 EST 2010


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

Modified Files:
	CMakeLists.txt mymodule_.c 
Log Message:
FortranCInterface: Fix PathScale detection

PathScale Fortran mangles module symbols as "MYSUB.in.MYMODULE" and also
requires "mymodule_" when the module is imported.  We cannot provide the
symbol with ".in." mangling so we should not provide "mymodule_" because
it would duplicate the one in the Fortran-provided object file.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FortranCInterface/CMakeLists.txt,v
retrieving revision 1.7
retrieving revision 1.8
diff -C 2 -d -r1.7 -r1.8
*** CMakeLists.txt	5 Oct 2009 20:30:58 -0000	1.7
--- CMakeLists.txt	22 Jan 2010 19:15:47 -0000	1.8
***************
*** 57,60 ****
--- 57,61 ----
  #   MIPSpro uses "MY_SUB.in.MY_MODULE"
  #   SunPro uses "my_module.my_sub_"
+ #   PathScale uses "MY_SUB.in.MY_MODULE"
  
  # Add module symbols only with Fortran90.

Index: mymodule_.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FortranCInterface/mymodule_.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** mymodule_.c	5 Aug 2009 21:07:36 -0000	1.2
--- mymodule_.c	22 Jan 2010 19:15:47 -0000	1.3
***************
*** 1,2 ****
--- 1,8 ----
+ #if defined(__PATHSCALE__)
+ /* PathScale Fortran wants mymodule_ when calling any mymodule symbol,
+    but module symbols use '.in.' so we cannot provide them anyway.  */
+ void pathscale_mymodule_(void) {}
+ #else
  /* PGI Fortran wants mymodule_ when calling any mymodule symbol.  */
  void mymodule_(void) {}
+ #endif



More information about the Cmake-commits mailing list