diff options
author | Michel Zou <xantares09@hotmail.com> | 2013-08-14 23:28:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-08-14 23:31:31 (GMT) |
commit | d7a65a2f2cdaf36e42fe9c0d2a9ff55fecb79dc4 (patch) | |
tree | 28d7ed13098669b872d1d80d44366ae9a4b6c623 | |
parent | d7c1dfb8f88d45d3d91bee0fbb21829d02ae43c2 (diff) | |
download | CMake-d7a65a2f2cdaf36e42fe9c0d2a9ff55fecb79dc4.zip CMake-d7a65a2f2cdaf36e42fe9c0d2a9ff55fecb79dc4.tar.gz CMake-d7a65a2f2cdaf36e42fe9c0d2a9ff55fecb79dc4.tar.bz2 |
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>
-rw-r--r-- | Modules/FortranCInterface/Detect.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake index 798c44c..afeb9c5 100644 --- a/Modules/FortranCInterface/Detect.cmake +++ b/Modules/FortranCInterface/Detect.cmake @@ -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 ) |