From 4ec1c6be6480eeac736f23b74a519b1d257a28e0 Mon Sep 17 00:00:00 2001 From: Christian Blichmann Date: Thu, 11 May 2023 07:50:03 -0700 Subject: [PATCH] CMake: Update policy settings to 3.26 This avoids a warning in newer CMake versions. For `CMP0083`, we still need to explicitly select `NEW` behavior. `check_pie_supported()` will error if it is unset even on later CMake versions. PiperOrigin-RevId: 531200735 Change-Id: Icb17a00cac087bd6888f8a9b9f8dd837358a6090 --- CMakeLists.txt | 8 ++++++-- contrib/brotli/CMakeLists.txt | 2 +- contrib/c-blosc/CMakeLists.txt | 2 +- contrib/hunspell/CMakeLists.txt | 2 +- contrib/jsonnet/CMakeLists.txt | 2 +- contrib/libidn2/CMakeLists.txt | 2 +- contrib/libraw/CMakeLists.txt | 2 +- contrib/libtiff/CMakeLists.txt | 2 +- contrib/libxls/CMakeLists.txt | 2 +- contrib/lodepng/CMakeLists.txt | 2 +- contrib/pffft/CMakeLists.txt | 2 +- contrib/turbojpeg/CMakeLists.txt | 2 +- contrib/uriparser/CMakeLists.txt | 2 +- contrib/woff2/CMakeLists.txt | 2 +- contrib/zopfli/CMakeLists.txt | 2 +- 15 files changed, 20 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4453d0d..c2b9704 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,10 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) if(POLICY CMP0083) - cmake_policy(SET CMP0083 NEW) + cmake_policy(SET CMP0083 NEW) # Add PIE flags when requested +endif() + +if(POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) # Set download timestamp to current time endif() project(SandboxedAPI C CXX ASM) diff --git a/contrib/brotli/CMakeLists.txt b/contrib/brotli/CMakeLists.txt index f946712..5ff61f6 100644 --- a/contrib/brotli/CMakeLists.txt +++ b/contrib/brotli/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(sapi_brotli CXX) include(CTest) diff --git a/contrib/c-blosc/CMakeLists.txt b/contrib/c-blosc/CMakeLists.txt index 5b14149..c66cbb9 100644 --- a/contrib/c-blosc/CMakeLists.txt +++ b/contrib/c-blosc/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(sapi_blosc CXX) include(CTest) diff --git a/contrib/hunspell/CMakeLists.txt b/contrib/hunspell/CMakeLists.txt index 5bd5adc..6bd8f69 100644 --- a/contrib/hunspell/CMakeLists.txt +++ b/contrib/hunspell/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(sapi_hunspell CXX) include(CTest) diff --git a/contrib/jsonnet/CMakeLists.txt b/contrib/jsonnet/CMakeLists.txt index eab7dbe..68b60e9 100644 --- a/contrib/jsonnet/CMakeLists.txt +++ b/contrib/jsonnet/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(jsonnet-sapi C CXX) include(CTest) diff --git a/contrib/libidn2/CMakeLists.txt b/contrib/libidn2/CMakeLists.txt index 20229b1..a61ab82 100644 --- a/contrib/libidn2/CMakeLists.txt +++ b/contrib/libidn2/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(libidn2-sapi CXX C) include(CTest) diff --git a/contrib/libraw/CMakeLists.txt b/contrib/libraw/CMakeLists.txt index d7cc84a..a41391c 100644 --- a/contrib/libraw/CMakeLists.txt +++ b/contrib/libraw/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(sapi_libraw CXX) include(CTest) diff --git a/contrib/libtiff/CMakeLists.txt b/contrib/libtiff/CMakeLists.txt index 3433ea6..36182f3 100644 --- a/contrib/libtiff/CMakeLists.txt +++ b/contrib/libtiff/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(sandboxed_libtiff CXX) include(CTest) diff --git a/contrib/libxls/CMakeLists.txt b/contrib/libxls/CMakeLists.txt index ac2d009..c01f0fa 100644 --- a/contrib/libxls/CMakeLists.txt +++ b/contrib/libxls/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(sapi_libxls C CXX) include(CTest) include(GoogleTest) diff --git a/contrib/lodepng/CMakeLists.txt b/contrib/lodepng/CMakeLists.txt index 8ddc5a9..fd9f0a8 100644 --- a/contrib/lodepng/CMakeLists.txt +++ b/contrib/lodepng/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(lodepng_sapi C CXX) include(CTest) diff --git a/contrib/pffft/CMakeLists.txt b/contrib/pffft/CMakeLists.txt index 0375733..02234b7 100644 --- a/contrib/pffft/CMakeLists.txt +++ b/contrib/pffft/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(pffft CXX C) include(CTest) diff --git a/contrib/turbojpeg/CMakeLists.txt b/contrib/turbojpeg/CMakeLists.txt index b098f01..dc48376 100644 --- a/contrib/turbojpeg/CMakeLists.txt +++ b/contrib/turbojpeg/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(turbojpeg-sapi CXX C) include(CTest) diff --git a/contrib/uriparser/CMakeLists.txt b/contrib/uriparser/CMakeLists.txt index 9c5b217..d3d7092 100644 --- a/contrib/uriparser/CMakeLists.txt +++ b/contrib/uriparser/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(sapi_uriparser CXX) include(CTest) diff --git a/contrib/woff2/CMakeLists.txt b/contrib/woff2/CMakeLists.txt index 14991cf..a765eb0 100644 --- a/contrib/woff2/CMakeLists.txt +++ b/contrib/woff2/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(woff2-sapi CXX C) include(CTest) diff --git a/contrib/zopfli/CMakeLists.txt b/contrib/zopfli/CMakeLists.txt index 2e62399..0ac345b 100644 --- a/contrib/zopfli/CMakeLists.txt +++ b/contrib/zopfli/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.13..3.22) +cmake_minimum_required(VERSION 3.13..3.26) project(sapi_zopfli CXX) include(CTest)