Make -platform linux-clang-libc++ work with icecc
It usage of libc++ was never detected if the compiler was explicitly set to a specific clang binary and clang wrapper. Change-Id: I5fd3c84223cafedf06b34afe91d975e71c199e24 Pick-to: 6.9 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
82a5e8bdb7
commit
982fe396e5
@ -871,29 +871,27 @@ function(guess_compiler_from_mkspec)
|
||||
|
||||
check_whether_to_guess_compiler(guess_c_compiler CC CMAKE_C_COMPILER)
|
||||
check_whether_to_guess_compiler(guess_cxx_compiler CXX CMAKE_CXX_COMPILER)
|
||||
if(NOT guess_c_compiler AND NOT guess_cxx_compiler)
|
||||
return()
|
||||
endif()
|
||||
|
||||
string(REGEX MATCH "(^|;)-DQT_QMAKE_TARGET_MKSPEC=\([^;]+\)" m "${cmake_args}")
|
||||
set(mkspec ${CMAKE_MATCH_2})
|
||||
set(c_compiler "")
|
||||
set(cxx_compiler "")
|
||||
if(mkspec MATCHES "-clang-msvc$")
|
||||
set(c_compiler "clang-cl")
|
||||
set(cxx_compiler "clang-cl")
|
||||
elseif(mkspec MATCHES "-clang(-|$)" AND NOT mkspec MATCHES "android")
|
||||
set(c_compiler "clang")
|
||||
set(cxx_compiler "clang++")
|
||||
elseif(mkspec MATCHES "-msvc(-|$)")
|
||||
set(c_compiler "cl")
|
||||
set(cxx_compiler "cl")
|
||||
endif()
|
||||
if(guess_c_compiler AND NOT c_compiler STREQUAL "")
|
||||
push("-DCMAKE_C_COMPILER=${c_compiler}")
|
||||
endif()
|
||||
if(guess_cxx_compiler AND NOT cxx_compiler STREQUAL "")
|
||||
push("-DCMAKE_CXX_COMPILER=${cxx_compiler}")
|
||||
if(guess_c_compiler OR guess_cxx_compiler)
|
||||
set(c_compiler "")
|
||||
set(cxx_compiler "")
|
||||
if(mkspec MATCHES "-clang-msvc$")
|
||||
set(c_compiler "clang-cl")
|
||||
set(cxx_compiler "clang-cl")
|
||||
elseif(mkspec MATCHES "-clang(-|$)" AND NOT mkspec MATCHES "android")
|
||||
set(c_compiler "clang")
|
||||
set(cxx_compiler "clang++")
|
||||
elseif(mkspec MATCHES "-msvc(-|$)")
|
||||
set(c_compiler "cl")
|
||||
set(cxx_compiler "cl")
|
||||
endif()
|
||||
if(guess_c_compiler AND NOT c_compiler STREQUAL "")
|
||||
push("-DCMAKE_C_COMPILER=${c_compiler}")
|
||||
endif()
|
||||
if(guess_cxx_compiler AND NOT cxx_compiler STREQUAL "")
|
||||
push("-DCMAKE_CXX_COMPILER=${cxx_compiler}")
|
||||
endif()
|
||||
endif()
|
||||
if(mkspec MATCHES "-libc\\+\\+$")
|
||||
push("-DFEATURE_stdlib_libcpp=ON")
|
||||
|
Loading…
x
Reference in New Issue
Block a user