diff options
author | Christian Pfeiffer <cpfeiffer@live.de> | 2017-05-05 15:32:52 (GMT) |
---|---|---|
committer | Christian Pfeiffer <cpfeiffer@live.de> | 2017-05-06 14:36:24 (GMT) |
commit | 2cfea104a632badc453364ec5babf97db7aa01e1 (patch) | |
tree | a03f8074ce90ef228fa41a3d647fbadd4204ed3d /Modules/FortranCInterface/CMakeLists.txt | |
parent | a83250880ad511d92d96bfd860873b9c79c0f462 (diff) | |
download | CMake-2cfea104a632badc453364ec5babf97db7aa01e1.zip CMake-2cfea104a632badc453364ec5babf97db7aa01e1.tar.gz CMake-2cfea104a632badc453364ec5babf97db7aa01e1.tar.bz2 |
FortranCInt: Pass CONFIG flags to try_compile
This change ensures that Intel Fortran's /libs: in
CMAKE_Fortran_FLAGS and Visual C++'s /MT or /MD in the
CMAKE_C_FLAGS_RELEASE do not conflict with each other.
Diffstat (limited to 'Modules/FortranCInterface/CMakeLists.txt')
-rw-r--r-- | Modules/FortranCInterface/CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt index 3a66f68..e067859 100644 --- a/Modules/FortranCInterface/CMakeLists.txt +++ b/Modules/FortranCInterface/CMakeLists.txt @@ -93,11 +93,12 @@ 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) +target_link_libraries(symbols PUBLIC 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}) -target_link_libraries(FortranCInterface symbols) +target_link_libraries(FortranCInterface PUBLIC symbols) |