[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-964-g996e95b

Brad King brad.king at kitware.com
Fri Nov 4 09:54:56 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  996e95b07cd311e88c77d245d5f532d1b6c7fbd4 (commit)
       via  80e477239dc3a57f87f9efb7b1d78eb0f0e2b6a3 (commit)
      from  d1de38461085cf6405f76130753d9f12bbeb9519 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=996e95b07cd311e88c77d245d5f532d1b6c7fbd4
commit 996e95b07cd311e88c77d245d5f532d1b6c7fbd4
Merge: d1de384 80e4772
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 4 09:54:56 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 4 09:54:56 2016 -0400

    Merge topic 'FortranCInterface-pic' into next
    
    80e47723 FortranCInterface: Make mangling detection robust to PIC Fortran


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80e477239dc3a57f87f9efb7b1d78eb0f0e2b6a3
commit 80e477239dc3a57f87f9efb7b1d78eb0f0e2b6a3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 4 09:52:03 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 4 09:54:12 2016 -0400

    FortranCInterface: Make mangling detection robust to PIC Fortran
    
    When using a Fortran compiler that produces PIC executables by default
    with a C compiler that does not produce PIC by default then the mangling
    detection executable fails to link.  Explicitly enable PIC for the C
    compiler just in case the Fortran compiler needs it to link.
    
    Issue: #16405

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})

-----------------------------------------------------------------------

Summary of changes:
 Modules/FortranCInterface/CMakeLists.txt |    3 +++
 1 file changed, 3 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list