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.
This commit is contained in:
parent
ddef8a7cff
commit
18a253732d
|
@ -44,7 +44,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# If the compiler is still unknown, try to query its vendor.
|
# 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})
|
CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue