summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-05-12 16:23:15 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2023-05-16 19:11:11 +0200
commitc33427240f1e7e99a36d4c8fff19975ebe508839 (patch)
tree083813685b2e8a4175178542b7ad59b54956c4a3
parentb7c15f7f24c1f0afcea87b31d3b4e096149c9e7d (diff)
downloadqtbase-c33427240f1e7e99a36d4c8fff19975ebe508839.tar.gz
Make sure that -utf-8 flag only apply to MSVC
INTERFACE scope propagates the '-utf-8' flag to the target dependencies. So if Qt is built using MSVC, but the depending targets use different compiler this flag will break the compilation. Guard the flag using genex. Amends e3cc2487ce63cae42d8054b38fdb54abe8545007 Pick-to: 6.5 Task-number: QTBUG-112737 Change-Id: Ie0576667108820dd61035debfc1fcc030ef3536a Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--cmake/QtFlagHandlingHelpers.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index fa47813792..096922b14c 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -288,7 +288,7 @@ endfunction()
function(qt_enable_utf8_sources target)
set(utf8_flags "")
if(MSVC)
- list(APPEND utf8_flags "-utf-8")
+ list(APPEND utf8_flags "$<$<CXX_COMPILER_ID:MSVC>:-utf-8>")
endif()
if(utf8_flags)