summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-07 13:21:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-07 13:25:41 (GMT)
commitfcb39aaa19360ae9096f2f2567e3afb1630cc370 (patch)
tree1eda07405e6d048b8af913cf52137309c2bc7d4d
parentb5d8610430b844231278db9ca3f807e2c433a608 (diff)
parent6e2193a26dd3e73af41a86f672d84144beb5a3c9 (diff)
downloadCMake-fcb39aaa19360ae9096f2f2567e3afb1630cc370.zip
CMake-fcb39aaa19360ae9096f2f2567e3afb1630cc370.tar.gz
CMake-fcb39aaa19360ae9096f2f2567e3afb1630cc370.tar.bz2
Merge topic 'update-CheckFortran'
6e2193a2 Tests: Avoid hanging on check for Fortran e673e6f0 Tests: Pass generator instance into check for Fortran Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1454
-rw-r--r--Tests/CheckFortran.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/CheckFortran.cmake b/Tests/CheckFortran.cmake
index b1652ba..16a8ed2 100644
--- a/Tests/CheckFortran.cmake
+++ b/Tests/CheckFortran.cmake
@@ -15,11 +15,18 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
\"set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 \\\"\${CMAKE_Fortran_COMPILER_SUPPORTS_F90}\\\")\\n\"
)
")
+ if(CMAKE_GENERATOR_INSTANCE)
+ set(_D_CMAKE_GENERATOR_INSTANCE "-DCMAKE_GENERATOR_INSTANCE:INTERNAL=${CMAKE_GENERATOR_INSTANCE}")
+ else()
+ set(_D_CMAKE_GENERATOR_INSTANCE "")
+ endif()
execute_process(
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran
COMMAND ${CMAKE_COMMAND} . -G ${CMAKE_GENERATOR}
-A "${CMAKE_GENERATOR_PLATFORM}"
-T "${CMAKE_GENERATOR_TOOLSET}"
+ ${_D_CMAKE_GENERATOR_INSTANCE}
+ TIMEOUT 60
OUTPUT_VARIABLE output
ERROR_VARIABLE output
RESULT_VARIABLE result