Teach FortranC interface for Intel, PGI, and gcc 4.2
This commit is contained in:
parent
6e54b18b5d
commit
71287734a9
|
@ -21,12 +21,16 @@ list(REMOVE_DUPLICATES global_symbols)
|
|||
|
||||
# List manglings of module symbol names to try.
|
||||
set(module_symbols
|
||||
__my_module_MOD_my_sub # GNU
|
||||
__my_module_MOD_my_sub # GNU 4.3
|
||||
__my_module__my_sub # GNU 4.2
|
||||
__mymodule__mysub # GNU 4.2
|
||||
__my_module_NMOD_my_sub # VisualAge
|
||||
__mymodule_MOD_mysub # GNU
|
||||
__mymodule_NMOD_mysub # VisualAge
|
||||
my_module_my_sub_ # PGI 8
|
||||
my_module$my_sub # HP
|
||||
my_module_mp_my_sub_ # Intel
|
||||
mymodule_mysub_ # PGI 8
|
||||
mymodule$mysub # HP
|
||||
mymodule_mp_mysub_ # Intel
|
||||
${FortranCInterface_MODULE_SYMBOLS}
|
||||
|
@ -66,7 +70,7 @@ endforeach()
|
|||
add_library(myfort STATIC mysub.f my_sub.f ${myfort_modules})
|
||||
|
||||
# Provide symbols through C but fall back to Fortran.
|
||||
add_library(symbols STATIC ${symbol_sources})
|
||||
add_library(symbols STATIC ${symbol_sources} mymodule_.c my_module_.c)
|
||||
target_link_libraries(symbols myfort)
|
||||
|
||||
# Require symbols through Fortran.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
void my_module_(void){}
|
|
@ -0,0 +1 @@
|
|||
void mymodule_(void){}
|
Loading…
Reference in New Issue