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:
Allan Sandfeld Jensen 2025-02-04 13:30:36 +01:00
parent 82a5e8bdb7
commit 982fe396e5

View File

@ -871,12 +871,9 @@ function(guess_compiler_from_mkspec)
check_whether_to_guess_compiler(guess_c_compiler CC CMAKE_C_COMPILER) check_whether_to_guess_compiler(guess_c_compiler CC CMAKE_C_COMPILER)
check_whether_to_guess_compiler(guess_cxx_compiler CXX CMAKE_CXX_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}") string(REGEX MATCH "(^|;)-DQT_QMAKE_TARGET_MKSPEC=\([^;]+\)" m "${cmake_args}")
set(mkspec ${CMAKE_MATCH_2}) set(mkspec ${CMAKE_MATCH_2})
if(guess_c_compiler OR guess_cxx_compiler)
set(c_compiler "") set(c_compiler "")
set(cxx_compiler "") set(cxx_compiler "")
if(mkspec MATCHES "-clang-msvc$") if(mkspec MATCHES "-clang-msvc$")
@ -895,6 +892,7 @@ function(guess_compiler_from_mkspec)
if(guess_cxx_compiler AND NOT cxx_compiler STREQUAL "") if(guess_cxx_compiler AND NOT cxx_compiler STREQUAL "")
push("-DCMAKE_CXX_COMPILER=${cxx_compiler}") push("-DCMAKE_CXX_COMPILER=${cxx_compiler}")
endif() endif()
endif()
if(mkspec MATCHES "-libc\\+\\+$") if(mkspec MATCHES "-libc\\+\\+$")
push("-DFEATURE_stdlib_libcpp=ON") push("-DFEATURE_stdlib_libcpp=ON")
endif() endif()