taocpp / taopq

C++ client library for PostgreSQL
Boost Software License 1.0
265 stars 40 forks source link

Fix PostgreSQL cmake find error #49

Closed uilianries closed 2 years ago

uilianries commented 2 years ago

Let's try to fix the Windows CI. PostgreSQL 14 is seems be broken.

codecov-commenter commented 2 years ago

Codecov Report

Merging #49 (ae5171f) into main (1bebcfe) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #49   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files          63       63           
  Lines        2067     2067           
=======================================
  Hits         2066     2066           
  Misses          1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1bebcfe...ae5171f. Read the comment docs.

uilianries commented 2 years ago

@d-frey Sorry my delay ... I reverted your last commit, the workaround to downgrade to PG 13.

The CMake have a bunch of Findxxx.cmake, but usually there are no versions listed in each file, however, FindPostgreSQL.cmake has a list, which the latest is 13. Fortunately, the added a custom definition, which can add new versions, otherwise, we would need to patch that cmake file. It should be fixed by CMake project in the future, but for now, this workaround is enough and safe.

d-frey commented 2 years ago

Nice find! Thank you, that really helps and it's easy to remove once CMake get upgraded to include v14 by default.