summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-24 11:31:58 -0400
committerBrad King <brad.king@kitware.com>2013-10-24 11:34:07 -0400
commit332771c942c25c0e60de136091fe77ac761e1965 (patch)
tree3e0189820038684ed9a12a57c755b102035bc508 /Modules/CMakeDetermineCXXCompiler.cmake
parent8c0bbd37df52900678b3a85b146d7a7f65cba374 (diff)
downloadcmake-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/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index c79ba898d5..0a4624c9bd 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -91,10 +91,10 @@ else()
get_filename_component(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH)
if(NOT _CMAKE_USER_CXX_COMPILER_PATH)
find_program(CMAKE_CXX_COMPILER_WITH_PATH NAMES ${CMAKE_CXX_COMPILER})
- mark_as_advanced(CMAKE_CXX_COMPILER_WITH_PATH)
if(CMAKE_CXX_COMPILER_WITH_PATH)
set(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE)
endif()
+ unset(CMAKE_CXX_COMPILER_WITH_PATH CACHE)
endif()
endif()
mark_as_advanced(CMAKE_CXX_COMPILER)