Skip to content

FortranCInterface: Honor CMAKE_EXE_LINKER_FLAGS under CMP0056

Brad King requested to merge brad.king/cmake:FortranCInterface-CMP0056 into master

Policy CMP0056 determines whether CMAKE_EXE_LINKER_FLAGS are passed into the test project used by the source-file signature of try_compile. That affects how implicit link directories are detected, so we need to also honor the policy for the source-directory signature of try_compile used in FortranCInterface in order to get matching link directories.

While at it, also fix FortranCInterface breakage when changing the path to cmake for an existing build tree. EDIT: this part was dropped.

Fixes: #21408 (closed)

Edited by Brad King

Merge request reports