mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
FortranCInterface: Fix cross-compiling Linux to MinGW (#14358)
After building the test binary tell find_program to search for it with
the ${CMAKE_EXECUTABLE_SUFFIX} so that the .exe can be found. Since
find_program is normally used to locate host tools while cross-compiling
it needs this hint to find the target binary.
Suggested-by: Denis Barbier <bouzim@gmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ unset(FortranCInterface_COMPILED CACHE)
|
||||
# Locate the sample project executable.
|
||||
if(FortranCInterface_COMPILED)
|
||||
find_program(FortranCInterface_EXE
|
||||
NAMES FortranCInterface
|
||||
NAMES FortranCInterface${CMAKE_EXECUTABLE_SUFFIX}
|
||||
PATHS ${FortranCInterface_BINARY_DIR} ${FortranCInterface_BINARY_DIR}/Debug
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user