From 18a253732db75afb713ce1bdd07d593780a4590b Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 22 Oct 2013 13:59:56 -0400 Subject: [PATCH] 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. --- Modules/CMakeDetermineCompilerId.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 0d7aa617b..bb260f62a 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()