ecmwf / fckit

A Fortran toolkit for interoperating Fortran with C/C++
https://confluence.ecmwf.int/display/fckit
Apache License 2.0
29 stars 15 forks source link

Failure in final-support.cmake when special link options are needed #4

Closed DJDavies2 closed 6 years ago

DJDavies2 commented 6 years ago

This is strongly related to https://github.com/ecmwf/ecbuild/issues/1. It is actually the same issue but occurring in check_final_support instead of ecbuild_check_fortran. Again a workaround is to set -rpath in CMAKE_Fortran_FLAGS as that seems to propagate, but surely CMAKE_EXE_LINKER_FLAGS should propagate as well?

DJDavies2 commented 6 years ago

I have a possible fix for this here: https://github.com/ecmwf/fckit/pull/5. In conjunction with the fix for https://github.com/ecmwf/ecbuild/issues/1 this allows my build to work. The fix isn't quite the same as for ecbuild because the code seems to be structured slightly differently but the aim is the same: to get CMAKE_EXE_LINKER_FLAGS applied via LINK_LIBRARIES when building the test executable so that e.g rpath's are applied appropriately.

wdeconinck commented 6 years ago

PR #5 is merged and available in 0.5.2