diff options
author | Brad King <brad.king@kitware.com> | 2016-11-08 14:44:31 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-11-08 14:44:31 (GMT) |
commit | 69bb9f37f9b71a109ef9547af25144e207f116e4 (patch) | |
tree | 1fbc167cdb58be7fb4d744c4e1e7910bc60af4af | |
parent | 48910cf0968a4c5b4ffd9093972498920404685f (diff) | |
parent | 80e477239dc3a57f87f9efb7b1d78eb0f0e2b6a3 (diff) | |
download | CMake-69bb9f37f9b71a109ef9547af25144e207f116e4.zip CMake-69bb9f37f9b71a109ef9547af25144e207f116e4.tar.gz CMake-69bb9f37f9b71a109ef9547af25144e207f116e4.tar.bz2 |
Merge topic 'FortranCInterface-pic'
80e47723 FortranCInterface: Make mangling detection robust to PIC Fortran
-rw-r--r-- | Modules/FortranCInterface/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt index dee57b5..3a66f68 100644 --- a/Modules/FortranCInterface/CMakeLists.txt +++ b/Modules/FortranCInterface/CMakeLists.txt @@ -94,6 +94,9 @@ 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}) target_link_libraries(symbols myfort) +# In case the Fortran compiler produces PIC by default make sure +# the C compiler produces PIC even if it is not its default. +set_property(TARGET symbols PROPERTY POSITION_INDEPENDENT_CODE 1) # Require symbols through Fortran. add_executable(FortranCInterface main.F call_sub.f ${call_mod}) |