From 25de8283057d6cd8ae02912d9ca169b4d3b24be6 Mon Sep 17 00:00:00 2001 From: Lankind Date: Mon, 9 Sep 2024 13:16:57 +0200 Subject: [PATCH] Force english in pg_config command Force English in the pg_config command executed by cmake to avoid unexpected building errors. Fixes #7257 --- .unreleased/pr_7258 | 2 ++ CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .unreleased/pr_7258 diff --git a/.unreleased/pr_7258 b/.unreleased/pr_7258 new file mode 100644 index 00000000000..79030683c4d --- /dev/null +++ b/.unreleased/pr_7258 @@ -0,0 +1,2 @@ +Fixes: #7258 Force English in the pg_config command executed by cmake to avoid unexpected building errors +Thanks: @MiguelTubio for reporting and fixing a Windows build error diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ba813ca784..d3b7844777b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ function(GET_PG_CONFIG var) # Only call pg_config if the variable didn't already have a value. if(NOT ${var}) execute_process( - COMMAND ${PG_CONFIG} ${ARGN} + COMMAND ${CMAKE_COMMAND} -E env LC_MESSAGES=C ${PG_CONFIG} ${ARGN} OUTPUT_VARIABLE _temp OUTPUT_STRIP_TRAILING_WHITESPACE) endif()