From 2265c18baf2870a4b77bf267da1d33dff46d4775 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:45:46 +0100 Subject: [PATCH] Report the PG version and path before complaining it's incorrect (#6634) Helps to investigate errors where a wrong PG version gets picked. --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c5098ff4..b83c8b937 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,14 +342,17 @@ else() endif() set(PG_VERSION "${PG_VERSION_MAJOR}.${PG_VERSION_MINOR}") +message( + STATUS + "Compiling against PostgreSQL version ${PG_VERSION} using pg_config '${PG_CONFIG}'" +) + # Ensure that PostgreSQL version is supported and consistent with src/compat.h # version check if((${PG_VERSION_MAJOR} LESS "13") OR (${PG_VERSION_MAJOR} GREATER "16") AND NOT (${EXPERIMENTAL})) message(FATAL_ERROR "TimescaleDB only supports PostgreSQL 13, 14, 15 and 16") -else() - message(STATUS "Compiling against PostgreSQL version ${PG_VERSION}") endif() # Get PostgreSQL configuration from pg_config