summaryrefslogtreecommitdiff
path: root/Modules/FortranCInterface
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-31 11:06:20 -0500
committerBrad King <brad.king@kitware.com>2017-02-01 08:47:42 -0500
commitc9ee05d8d9b5d2ab1539d469682a4a3974282443 (patch)
treeeb1d400770cb2ba225c86d4dc11cfaddb39670a6 /Modules/FortranCInterface
parent5efb8b9a5df82fef0b6abac11f590f2a655c184e (diff)
downloadcmake-c9ee05d8d9b5d2ab1539d469682a4a3974282443.tar.gz
FortranCInterface: Fix support for VS with Intel toolset
When using a Visual Studio generator with an Intel toolset, such as -T "Intel C++ Compiler XE 14.0" the generated FortranCInterface mangling detection project may fail to build due to `devenv` not working with the `/project ALL_BUILD` option. This seems to be a bug in `devenv` or the Intel VS integration. Work around the problem by building with `/project FortranCInterface` instead. We only need to build this executable and its dependencies within the detection test project anyway. Fixes: #16519
Diffstat (limited to 'Modules/FortranCInterface')
-rw-r--r--Modules/FortranCInterface/Detect.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake
index 9984efd327..76128902f1 100644
--- a/Modules/FortranCInterface/Detect.cmake
+++ b/Modules/FortranCInterface/Detect.cmake
@@ -30,7 +30,8 @@ set(_result)
try_compile(FortranCInterface_COMPILED
${FortranCInterface_BINARY_DIR}
${FortranCInterface_SOURCE_DIR}
- FortranCInterface
+ FortranCInterface # project name
+ FortranCInterface # target name
CMAKE_FLAGS
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"