diff options
author | Brad King <brad.king@kitware.com> | 2017-11-06 12:49:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-11-06 15:21:11 (GMT) |
commit | e673e6f053f7320f78a2ce9ed262f9c11e503998 (patch) | |
tree | c567799a0e8dfd291875316ac7caaa8ff53c7150 /Tests/CheckFortran.cmake | |
parent | b104bcfd98add349f7624887073c79a84ae41c44 (diff) | |
download | CMake-e673e6f053f7320f78a2ce9ed262f9c11e503998.zip CMake-e673e6f053f7320f78a2ce9ed262f9c11e503998.tar.gz CMake-e673e6f053f7320f78a2ce9ed262f9c11e503998.tar.bz2 |
Tests: Pass generator instance into check for Fortran
Check for a Fortran compiler using the same VS instance that we are
testing.
Diffstat (limited to 'Tests/CheckFortran.cmake')
-rw-r--r-- | Tests/CheckFortran.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CheckFortran.cmake b/Tests/CheckFortran.cmake index b1652ba..653f521 100644 --- a/Tests/CheckFortran.cmake +++ b/Tests/CheckFortran.cmake @@ -15,11 +15,17 @@ 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} OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result |