Commit 18a25373 authored by Brad King's avatar Brad King

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.
parent ddef8a7c
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment