diff options
author | Brad King <brad.king@kitware.com> | 2013-10-24 11:31:58 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-24 11:34:07 -0400 |
commit | 332771c942c25c0e60de136091fe77ac761e1965 (patch) | |
tree | 3e0189820038684ed9a12a57c755b102035bc508 /Modules/CMakeDetermineFortranCompiler.cmake | |
parent | 8c0bbd37df52900678b3a85b146d7a7f65cba374 (diff) | |
download | cmake-332771c942c25c0e60de136091fe77ac761e1965.tar.gz |
CMakeDetermine*Compiler: Remove temporary cache entry
When the user or toolchain file sets CMAKE_<LANG>_COMPILER to a name
without a path we use find_program with CMAKE_<LANG>_COMPILER_WITH_PATH
to search for the tool. Remove the temporary cache entry afterward to
avoid exposing it to projects. It is not set by other logic paths so no
one should be using it.
Diffstat (limited to 'Modules/CMakeDetermineFortranCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineFortranCompiler.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 13cfb00549..10574b1171 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -109,11 +109,11 @@ else() get_filename_component(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH) if(NOT _CMAKE_USER_Fortran_COMPILER_PATH) find_program(CMAKE_Fortran_COMPILER_WITH_PATH NAMES ${CMAKE_Fortran_COMPILER}) - mark_as_advanced(CMAKE_Fortran_COMPILER_WITH_PATH) if(CMAKE_Fortran_COMPILER_WITH_PATH) set(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_WITH_PATH} CACHE STRING "Fortran compiler" FORCE) endif() + unset(CMAKE_Fortran_COMPILER_WITH_PATH CACHE) endif() endif() mark_as_advanced(CMAKE_Fortran_COMPILER) |