Skip to content

Commit

Permalink
Remove unneeded cmp0074 new (#876)
Browse files Browse the repository at this point in the history
(We can do this now that we require a newer CMake.)
  • Loading branch information
killerbot242 committed Aug 3, 2024
1 parent 1de141d commit 4ad6087
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
11 changes: 0 additions & 11 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,7 @@ include(CheckCXXSourceCompiles)
include(CMakeFindDependencyMacro)

if(NOT PostgreSQL_FOUND)
if(POLICY CMP0074)
cmake_policy(PUSH)
# CMP0074 is `OLD` by `cmake_minimum_required(VERSION 3.7)`, sets `NEW`
# to enable support CMake variable `PostgreSQL_ROOT`.
cmake_policy(SET CMP0074 NEW)
endif()

find_package(PostgreSQL)

if(POLICY CMP0074)
cmake_policy(POP)
endif()
endif()

if(NOT PostgreSQL_FOUND)
Expand Down
11 changes: 0 additions & 11 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
if(NOT PostgreSQL_FOUND)
if(POLICY CMP0074)
cmake_policy(PUSH)
# CMP0074 is `OLD` by `cmake_minimum_required(VERSION 3.7)`, sets `NEW`
# to enable support CMake variable `PostgreSQL_ROOT`.
cmake_policy(SET CMP0074 NEW)
endif()

find_package(PostgreSQL REQUIRED)

if(POLICY CMP0074)
cmake_policy(POP)
endif()
endif()

file(GLOB UNIT_TEST_SOURCES *.cxx)
Expand Down

0 comments on commit 4ad6087

Please sign in to comment.