diff options
author | Brad King <brad.king@kitware.com> | 2014-07-24 17:10:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-24 17:37:07 (GMT) |
commit | 8981513a810a97d10e299407e12c46aabe68f00a (patch) | |
tree | f048ada3f37158b39f0269b139a564fde70afc0c /Modules | |
parent | 731427a646cd0ca81aa392872d18d125e917bf47 (diff) | |
download | CMake-8981513a810a97d10e299407e12c46aabe68f00a.zip CMake-8981513a810a97d10e299407e12c46aabe68f00a.tar.gz CMake-8981513a810a97d10e299407e12c46aabe68f00a.tar.bz2 |
CMakeDetermineCompiler: Simplify CMAKE_<LANG>_COMPILER default force-cache
If find_program does not find CMAKE_<LANG>_COMPILER, use set_property()
to force the value to be that of CMAKE_<LANG>_COMPILER_INIT instead of
set(). This allows us to set the value without re-specifying the type
and documentation, thus preserving what find_program set.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompiler.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake index cd0f8b8..0ab3af6 100644 --- a/Modules/CMakeDetermineCompiler.cmake +++ b/Modules/CMakeDetermineCompiler.cmake @@ -65,7 +65,7 @@ macro(_cmake_find_compiler lang) endif() find_program(CMAKE_${lang}_COMPILER NAMES ${CMAKE_${lang}_COMPILER_LIST} DOC "${lang} compiler") if(CMAKE_${lang}_COMPILER_INIT AND NOT CMAKE_${lang}_COMPILER) - set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_INIT}" CACHE FILEPATH "${lang} compiler" FORCE) + set_property(CACHE CMAKE_${lang}_COMPILER PROPERTY VALUE "${CMAKE_${lang}_COMPILER_INIT}") endif() unset(_${lang}_COMPILER_HINTS) unset(_languages) |