Re: [PATCH] CMake: disable deprecated behavior
Hi Yegor, You wrote on Fri, Sep 01, 2023 at 11:33:02AM +0200: > From: Yegor Yefremov > > Set policies CMP0011, CMP0057, CMP0099 to the new behavior. Since > version 3.27.4 if the policy is not set to the new behavior, CMake > will generate a warning. thanks a lot for the patches, all applied! A few patches are still in the queue and require more in-depth inspection, they'll be applied in the next round at the end of September. Cheers, Thomas -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com
[PATCH] CMake: disable deprecated behavior
From: Yegor Yefremov Set policies CMP0011, CMP0057, CMP0099 to the new behavior. Since version 3.27.4 if the policy is not set to the new behavior, CMake will generate a warning. --- CMakeLists.txt | 17 + 1 file changed, 17 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7f9b6..4064ad2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,23 @@ set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}) set(VERSION ${VERSION_STRING}) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) +# Support new if() IN_LIST operator +if(POLICY CMP0057) + cmake_policy(SET CMP0057 NEW) +endif() + +# Included scripts do automatic cmake_policy() PUSH and POP +if(POLICY CMP0011) + cmake_policy(SET CMP0011 NEW) +endif() + +# Target link properties INTERFACE_LINK_OPTIONS, INTERFACE_LINK_DIRECTORIES +# and INTERFACE_LINK_DEPENDS are now transitive over private dependencies +# of static libraries +if(POLICY CMP0099) + cmake_policy(SET CMP0099 NEW) +endif() + # CMake if("${CMAKE_BUILD_TYPE}" STREQUAL "") set(CMAKE_BUILD_TYPE RelWithDebInfo) -- 2.34.1 -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com