Skip to content

Commit

Permalink
Fixes #851
Browse files Browse the repository at this point in the history
Thanks @tt4g.
  • Loading branch information
jtv committed Jun 23, 2024
1 parent 7569caf commit d5bf7cf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ 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)
include(CMakeDetermineCompileFeatures)
include(CheckCXXSourceCompiles)
include(CMakeFindDependencyMacro)

Expand Down Expand Up @@ -39,7 +47,6 @@ check_function_exists("poll" PQXX_HAVE_POLL)

set(CMAKE_REQUIRED_LIBRARIES pq)

cmake_determine_compile_features(CXX)
cmake_policy(SET CMP0057 NEW)

# check_cxx_source_compiles requires CMAKE_REQUIRED_DEFINITIONS to specify
Expand Down

0 comments on commit d5bf7cf

Please sign in to comment.