summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2024-03-27 11:48:45 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-04-07 13:36:18 +0000
commit5737ae3ccfc141be38564c27c89e6e14d12c3cf6 (patch)
treeee95ccc47f12d5e1d8c2cf0ff47d88ca74665384 /cmake
parent21ff70afb4909e6b71316e47ffb10c7e579a925c (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.6 6.5 Change-Id: I6067bb719b7d35aa2464a91ed198399ff9b1c9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 4fcf6f5164be0c7cdc56b0a37dcadc42fac4f344) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindPostgreSQL.cmake3
-rw-r--r--cmake/QtBaseConfigureTests.cmake5
2 files changed, 8 insertions, 0 deletions
diff --git a/cmake/FindPostgreSQL.cmake b/cmake/FindPostgreSQL.cmake
index ca3a454527..a61bec9337 100644
--- a/cmake/FindPostgreSQL.cmake
+++ b/cmake/FindPostgreSQL.cmake
@@ -99,6 +99,9 @@ endif()
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
+if(POLICY CMP0159)
+ cmake_policy(SET CMP0159 NEW)
+endif()
set(PostgreSQL_INCLUDE_PATH_DESCRIPTION "top-level directory containing the PostgreSQL include directories. E.g /usr/local/include/PostgreSQL/8.4 or C:/Program Files/PostgreSQL/8.4/include")
set(PostgreSQL_INCLUDE_DIR_MESSAGE "Set the PostgreSQL_INCLUDE_DIR cmake cache entry to the ${PostgreSQL_INCLUDE_PATH_DESCRIPTION}")
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake
index 7713def6bf..ebfd17bddf 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)