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
pull/171/head
Christian Blichmann 2023-05-11 07:50:03 -07:00 committed by Copybara-Service
parent 9b307fc204
commit 4ec1c6be64
15 changed files with 20 additions and 16 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)