From 7fdd2f85804a4cea8b441c19f28ae79575b454d8 Mon Sep 17 00:00:00 2001 From: Lieven de Cock Date: Mon, 15 Jul 2024 20:15:35 +0200 Subject: [PATCH 1/3] remove a use added for a purpose which is gone in the meantime. The following comments explains why it was added, and that indeed it is no longer needed, as such. https://github.com/jtv/libpqxx/issues/851#issuecomment-2213649992 Note that neither of these 2 cmake modules are for public use, they are internal cmake stuff. Nothing on the outside should use it. This was feedback given by kitware developers. --- cmake/config.cmake | 9 --------- 1 file changed, 9 deletions(-) diff --git a/cmake/config.cmake b/cmake/config.cmake index 4d9f7e935..7aa968b90 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -8,15 +8,6 @@ function(detect_code_compiled code macro msg) endif() endfunction(detect_code_compiled) -if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.30.0) - include(CMakeDetermineCompilerSupport) - cmake_determine_compiler_support(CXX) -else() - # This function changed names in CMake 3.30. :-( - include(CMakeDetermineCompileFeatures) - cmake_determine_compile_features(CXX) -endif() - include(CheckIncludeFileCXX) include(CheckFunctionExists) include(CheckSymbolExists) From c2b9bb1434eca6964907d28aa2d1b38061dccb06 Mon Sep 17 00:00:00 2001 From: Lieven de Cock Date: Mon, 15 Jul 2024 20:42:29 +0200 Subject: [PATCH 2/3] not on master should be on a branch Revert "remove a use added for a purpose which is gone in the meantime." This reverts commit 7fdd2f85804a4cea8b441c19f28ae79575b454d8. --- cmake/config.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/config.cmake b/cmake/config.cmake index 7aa968b90..4d9f7e935 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -8,6 +8,15 @@ function(detect_code_compiled code macro msg) endif() endfunction(detect_code_compiled) +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.30.0) + include(CMakeDetermineCompilerSupport) + cmake_determine_compiler_support(CXX) +else() + # This function changed names in CMake 3.30. :-( + include(CMakeDetermineCompileFeatures) + cmake_determine_compile_features(CXX) +endif() + include(CheckIncludeFileCXX) include(CheckFunctionExists) include(CheckSymbolExists) From f10ac316f5fb120069292c96b2607427de1a0afc Mon Sep 17 00:00:00 2001 From: Lieven de Cock Date: Sat, 20 Jul 2024 18:54:49 +0200 Subject: [PATCH 3/3] setting the policy to new is not needed, because we demand cmake_minimum_required(VERSION 3.8) and this policy was introduced in cmake 3.3, see heere : https://cmake.org/cmake/help/latest/policy/CMP0057.html this means any newer cmake is using the new policy (unless somebody would set it to old explicitly) --- cmake/config.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/config.cmake b/cmake/config.cmake index 7aa968b90..72cea2825 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -38,8 +38,6 @@ check_function_exists("poll" PQXX_HAVE_POLL) set(CMAKE_REQUIRED_LIBRARIES pq) -cmake_policy(SET CMP0057 NEW) - # check_cxx_source_compiles requires CMAKE_REQUIRED_DEFINITIONS to specify # compiling arguments. Workaround: Push CMAKE_REQUIRED_DEFINITIONS if(CMAKE_REQUIRED_DEFINITIONS)