build: simplify policy-setting for dependencies

Passing `CMAKE_POLICY_DEFAULT_CMP0092=NEW` to all dependencies is
simpler than setting it manually in each file.
This commit is contained in:
dundargoc 2024-04-27 20:57:46 +02:00 committed by dundargoc
parent 52823616bc
commit 383018dbb8
7 changed files with 5 additions and 25 deletions

View File

@ -1,9 +1,4 @@
cmake_minimum_required(VERSION 3.13)
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
project(gettext C)
add_compile_options(-w)

View File

@ -1,8 +1,4 @@
cmake_minimum_required(VERSION 3.13)
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
project(libiconv C)
add_compile_options(-w)

View File

@ -1,8 +1,4 @@
cmake_minimum_required(VERSION 3.13)
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
project(libvterm C)
add_compile_options(-w)

View File

@ -1,8 +1,4 @@
cmake_minimum_required(VERSION 3.13)
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
project(${PARSERLANG} C)
add_compile_options(-w)

View File

@ -1,8 +1,4 @@
cmake_minimum_required(VERSION 3.13)
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
project(treesitter C)
add_compile_options(-w)

View File

@ -1,8 +1,4 @@
cmake_minimum_required(VERSION 3.13)
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
project(parser C)
add_compile_options(-w)

View File

@ -18,6 +18,11 @@ if(APPLE)
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_FIND_FRAMEWORK=${CMAKE_FIND_FRAMEWORK})
endif()
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_POLICY_DEFAULT_CMP0092=NEW)
endif()
# MAKE_PRG
if(UNIX)
find_program(MAKE_PRG NAMES gmake make)