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.
pull/5428/head
Javier Jaramago Fernández 3 months ago
parent f88dddaefb
commit 2bfa23665b

@ -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

Loading…
Cancel
Save