summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-28 12:39:29 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-28 12:39:29 (GMT)
commit16df2456a440d87fb3e8e53fb59a2817b288b9af (patch)
treea44c27696661e6edd6222dc01e4d783f3821010c /Modules/CMakeDetermineCompilerId.cmake
parentecc6d7f9190a660c0f442c4d03854b06e3fc7856 (diff)
parent3e04946f7b69418f6b222875ad18fed3438e0fa1 (diff)
downloadCMake-16df2456a440d87fb3e8e53fb59a2817b288b9af.zip
CMake-16df2456a440d87fb3e8e53fb59a2817b288b9af.tar.gz
CMake-16df2456a440d87fb3e8e53fb59a2817b288b9af.tar.bz2
Merge topic 'enable-language-require-compiler'
3e04946 Require CMAKE_<LANG>_COMPILER to be found as a full path 6007f7c CMakeDetermineCompilerId: Always use compiler detected from IDE 332771c CMakeDetermine*Compiler: Remove temporary cache entry
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake10
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 6fccb16..762d4ae 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -67,12 +67,10 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
endif()
# Check if compiler id detection gave us the compiler tool.
- if(NOT CMAKE_${lang}_COMPILER)
- if(CMAKE_${lang}_COMPILER_ID_TOOL)
- set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_ID_TOOL}" PARENT_SCOPE)
- else()
- set(CMAKE_${lang}_COMPILER "CMAKE_${lang}_COMPILER-NOTFOUND" PARENT_SCOPE)
- endif()
+ if(CMAKE_${lang}_COMPILER_ID_TOOL)
+ set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_ID_TOOL}" PARENT_SCOPE)
+ elseif(NOT CMAKE_${lang}_COMPILER)
+ set(CMAKE_${lang}_COMPILER "CMAKE_${lang}_COMPILER-NOTFOUND" PARENT_SCOPE)
endif()
set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)