diff options
author | Melven Roehrig-Zoellner <Melven.Roehrig-Zoellner@DLR.de> | 2016-04-03 23:01:22 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-05 09:44:09 -0400 |
commit | 66fa61439db3043e903074a526aa2200e9766dcc (patch) | |
tree | fad27601239137ec58bf23cd5392f222abd940bc /Modules/CMakeDetermineFortranCompiler.cmake | |
parent | 73efdd46555b3236ade1f4431eb9653166b5c97f (diff) | |
download | cmake-66fa61439db3043e903074a526aa2200e9766dcc.tar.gz |
CMakeDetermineFortranCompiler: Modernize conventions
Suggested-by: Ben Boeckel <ben.boeckel@kitware.com>
Diffstat (limited to 'Modules/CMakeDetermineFortranCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineFortranCompiler.cmake | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index ccafb07795..1baca2972b 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -185,11 +185,10 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN) # Fall back to old is-GNU test. if(NOT CMAKE_Fortran_COMPILER_ID) - exec_program(${CMAKE_Fortran_COMPILER} - ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\"" - OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN) + execute_process(COMMAND ${CMAKE_Fortran_COMPILER} ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "${CMAKE_ROOT}/Modules/CMakeTestGNU.c" + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RESULT_VARIABLE CMAKE_COMPILER_RETURN) if(NOT CMAKE_COMPILER_RETURN) - if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_GNU") + if(CMAKE_COMPILER_OUTPUT MATCHES "THIS_IS_GNU") set(CMAKE_Fortran_COMPILER_ID "GNU") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran compiler is GNU succeeded with " @@ -200,10 +199,10 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN) "the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n") endif() if(NOT CMAKE_Fortran_PLATFORM_ID) - if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_MINGW") + if(CMAKE_COMPILER_OUTPUT MATCHES "THIS_IS_MINGW") set(CMAKE_Fortran_PLATFORM_ID "MinGW") endif() - if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_CYGWIN") + if(CMAKE_COMPILER_OUTPUT MATCHES "THIS_IS_CYGWIN") set(CMAKE_Fortran_PLATFORM_ID "Cygwin") endif() endif() |