diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2024-03-27 11:48:45 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2024-03-27 16:06:29 +0100 |
commit | 4fcf6f5164be0c7cdc56b0a37dcadc42fac4f344 (patch) | |
tree | ef2872c8e3aee29a33b38ad4bca72536e3961dff /cmake/QtBaseConfigureTests.cmake | |
parent | d25d9f2c2673bc287590d9a83bd7ef1357d7021a (diff) |
Set the CMP0159 to NEW where applicable
The policy controls the file(STRING ... REGEX) behavior. This
suppresses warnings produced by CMake versions >= 3.29.
Pick-to: 6.5 6.6 6.7
Change-Id: I6067bb719b7d35aa2464a91ed198399ff9b1c9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBaseConfigureTests.cmake')
-rw-r--r-- | cmake/QtBaseConfigureTests.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake index d41f93d825..4ac4f35f01 100644 --- a/cmake/QtBaseConfigureTests.cmake +++ b/cmake/QtBaseConfigureTests.cmake @@ -62,8 +62,13 @@ function(qt_run_config_test_architecture) endif() message(STATUS "Extracting architecture info from ${_arch_file}.") + cmake_policy(PUSH) + if(POLICY CMP0159) + cmake_policy(SET CMP0159 NEW) + endif() file(STRINGS "${_arch_file}" _arch_lines LENGTH_MINIMUM 16 LENGTH_MAXIMUM 1024 ENCODING UTF-8 REGEX "==Qt=magic=Qt==") + cmake_policy(POP) foreach (_line ${_arch_lines}) string(LENGTH "${_line}" lineLength) |