CMakeDetermineCompilerId: Always use compiler detected from IDE
When compiler id detection also provides a CMAKE_<LANG>_COMPILER value, use it unconditionally. It is known to be the compiler that is actually in use by IDE builds in VS and Xcode. Do not let a stray cache entry try to say otherwise.
This commit is contained in:
parent
332771c942
commit
6007f7ca01
|
@ -67,12 +67,10 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Check if compiler id detection gave us the compiler tool.
|
# Check if compiler id detection gave us the compiler tool.
|
||||||
if(NOT CMAKE_${lang}_COMPILER)
|
if(CMAKE_${lang}_COMPILER_ID_TOOL)
|
||||||
if(CMAKE_${lang}_COMPILER_ID_TOOL)
|
set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_ID_TOOL}" PARENT_SCOPE)
|
||||||
set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_ID_TOOL}" PARENT_SCOPE)
|
elseif(NOT CMAKE_${lang}_COMPILER)
|
||||||
else()
|
set(CMAKE_${lang}_COMPILER "CMAKE_${lang}_COMPILER-NOTFOUND" PARENT_SCOPE)
|
||||||
set(CMAKE_${lang}_COMPILER "CMAKE_${lang}_COMPILER-NOTFOUND" PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
|
set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
|
||||||
|
|
Loading…
Reference in New Issue