From 2bfa23665bfbcd9d43ec0523b04231759b68626c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Fri, 27 Feb 2026 11:58:10 +0100 Subject: [PATCH] fix: compilation of test dep 'mysql-connector-c 5.7' in newer CMake (> 4) Compilation for 'mysql-connector-c' for 5.7 is broken in newer CMake versions. There is no simple around this, since CMake 4 introduces multiple breaking changes and 'CMAKE_POLICY_VERSION_MINIMUM' isn't sufficient to fix this issues. Due to this, the simplest fix is to install in the testing environment CMake3. This fixed version of CMake should be used specifically for building this dependency. Arch Linux has a package that could be used as reference https://aur.archlinux.org/packages/cmake3. --- test/deps/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/deps/Makefile b/test/deps/Makefile index 4c00e2d6e..bb9983bea 100644 --- a/test/deps/Makefile +++ b/test/deps/Makefile @@ -53,7 +53,10 @@ ifeq ($(UNAME_S),Darwin) cd mysql-connector-c/mysql-connector-c && cmake . -DWITH_BOOST=./boost -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O0 -ggdb -DNDEBUG -fPIC" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DWITH_SSL=$$(brew --prefix openssl@3) -DOPENSSL_ROOT_DIR=$$(brew --prefix openssl@3) else cd mysql-connector-c && ln -fsT $$(ls -1d mysql-5.7.*/) mysql-connector-c - cd mysql-connector-c/mysql-connector-c && cmake . -DWITH_BOOST=./boost -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O0 -ggdb -DNDEBUG -fPIC" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + cd mysql-connector-c/mysql-connector-c && cmake3 . -DWITH_BOOST=./boost \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-Wno-incompatible-pointer-types" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O0 -ggdb -DNDEBUG -fPIC -Wno-incompatible-pointer-types" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 endif ifeq ($(UNAME_S),Darwin) cd mysql-connector-c/mysql-connector-c && CC=${CC} CXX=${CXX} ${MAKE} -j1 mysqlclient mysql