diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-01-28 10:37:20 -0800 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-01 03:18:35 +0000 |
commit | c7e94c8b7fdd0e26e73945792c566439f9791b2b (patch) | |
tree | a75c95e6f4dc5a0a4b8de1fabb435d041827c2ff /cmake | |
parent | 28a9080e3f880d3d93f4d94855e09b16cb438641 (diff) |
CMake: fix running of headersclean targets when CMAKE_CXX_FLAGS is set
We were passing the full option from the user as a single string in the
command-line to the compiler.
clang++ -c "-O3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes" [...]
error: invalid integral value '3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes' in '-O3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes'
Fixes: QTBUG-100315
Change-Id: I6fcda969a9e9427198bffffd16ce83150d4e4263
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 05e029619f18e66d587075e929bc2d8c384f367a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtHeadersClean.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtHeadersClean.cmake b/cmake/QtHeadersClean.cmake index c2b83ccb48..3e6dbd616d 100644 --- a/cmake/QtHeadersClean.cmake +++ b/cmake/QtHeadersClean.cmake @@ -133,7 +133,7 @@ function(qt_internal_add_headers_clean_target # Use strict mode C++20, with no GNU extensions (see -pedantic-errors above). list(APPEND hcleanFLAGS -std=c++2a) - set(cxx_flags ${CMAKE_CXX_FLAGS}) + separate_arguments(cxx_flags NATIVE_COMMAND ${CMAKE_CXX_FLAGS}) if(APPLE AND CMAKE_OSX_SYSROOT) list(APPEND cxx_flags "${CMAKE_CXX_SYSROOT_FLAG}" "${CMAKE_OSX_SYSROOT}") |