summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-22 17:59:56 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-22 17:59:56 (GMT)
commit18a253732db75afb713ce1bdd07d593780a4590b (patch)
treeb049a3cd2b8e0c51ad7f06598f69a10befe689dc /Modules/CMakeDetermineCompilerId.cmake
parentddef8a7cfffbbae12f2d2c556651f06346237569 (diff)
downloadCMake-18a253732db75afb713ce1bdd07d593780a4590b.zip
CMake-18a253732db75afb713ce1bdd07d593780a4590b.tar.gz
CMake-18a253732db75afb713ce1bdd07d593780a4590b.tar.bz2
CMakeDetermineCompilerId: Do not test vendor without a compiler
If no CMAKE_${lang}_COMPILER is available then do not try to run it to determine the compiler vendor.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 0d7aa61..bb260f6 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -44,7 +44,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
endforeach()
# If the compiler is still unknown, try to query its vendor.
- if(NOT CMAKE_${lang}_COMPILER_ID)
+ if(CMAKE_${lang}_COMPILER AND NOT CMAKE_${lang}_COMPILER_ID)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang})
endif()