build: remove unnecessary policy related code

Having cmake version 3.10 as the required minimum version ensures these
are set to new by default.
This commit is contained in:
dundargoc 2022-08-09 17:02:51 +02:00 committed by dundargoc
parent b635f7ed41
commit 42aeb5c5b1
3 changed files with 1 additions and 17 deletions

View File

@ -6,12 +6,6 @@
cmake_minimum_required(VERSION 3.10)
project(nvim C)
if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()
if(POLICY CMP0060)
cmake_policy(SET CMP0060 NEW)
endif()
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW)
endif()

View File

@ -1,11 +1,6 @@
# Set LC_ALL to meet expectations of some locale-sensitive tests.
set(ENV{LC_ALL} "en_US.UTF-8")
if(POLICY CMP0012)
# Handle CI=true, without dev warnings.
cmake_policy(SET CMP0012 NEW)
endif()
set(ENV{VIMRUNTIME} ${WORKING_DIR}/runtime)
set(ENV{NVIM_RPLUGIN_MANIFEST} ${BUILD_DIR}/Xtest_rplugin_manifest)
set(ENV{XDG_CONFIG_HOME} ${BUILD_DIR}/Xtest_xdg/config)

View File

@ -443,11 +443,6 @@ endif()
set(NVIM_EXEC_LINK_LIBRARIES ${NVIM_LINK_LIBRARIES} ${LUA_PREFERRED_LIBRARIES})
# Add IPO flags (for LTO), or error if CMake does not know the flags. #8654
if(POLICY CMP0069)
cmake_policy(SET CMP0069 NEW)
endif()
add_executable(nvim ${NVIM_GENERATED_FOR_SOURCES} ${NVIM_GENERATED_FOR_HEADERS}
${NVIM_GENERATED_SOURCES} ${NVIM_SOURCES} ${NVIM_HEADERS}
${EXTERNAL_SOURCES} ${EXTERNAL_HEADERS})
@ -461,7 +456,7 @@ set_property(TARGET nvim APPEND PROPERTY
INCLUDE_DIRECTORIES ${LUA_PREFERRED_INCLUDE_DIRS})
set_property(TARGET nvim PROPERTY ENABLE_EXPORTS TRUE)
if(ENABLE_LTO AND (POLICY CMP0069))
if(ENABLE_LTO)
include(CheckIPOSupported)
check_ipo_supported(RESULT IPO_SUPPORTED)
if(IPO_SUPPORTED AND (NOT CMAKE_BUILD_TYPE MATCHES Debug))