mychem / mychem-code

Mychem is an extension for MySQL that makes possible to use cheminformatics functions within SQL queries.
GNU General Public License v2.0
21 stars 14 forks source link

CMake support for newer MariaDB #28

Open merkys opened 3 years ago

merkys commented 3 years ago

At some point in time MariaDB has ceased to provide convenience aliases for MySQL (I am using MariaDB v10.5.8 on Debian unstable). However, changes in names/paths are trivial, and I suggest introducing new CMake parameter, DBD_NAME, to allow user to specify it during the build (mysql would remain the default for backwards compatibility). With this PR the following command works with MariaDB:

cmake .. -DDBD_NAME=mariadb

I am quite inexperienced in writing CMake, so there might be better ways to achieve the main result, but I believe that command line parameter would still be needed to switch between MySQL and MariaDB.

By the way, compiler complains about the inclusion of m_ctype.h and m_string.h in header files under src/. After removing these includes compiler seems happier.

Pansanel commented 3 years ago

I am working on the refactoring of FindMySQL.cmake. It will integrate your fix. I will probably remove the windows support for the new version of Mychem, as I don't have the time to maintain the Windows port. It should not be a big issue, as most deployment are done on GNU/Linux. I will add a compatibility matrix in the documentation.

merkys commented 3 years ago

This would be great. I am mostly concerned about GNU/Linux too.

Pansanel commented 3 years ago

Can you take a look at #29 ? It should fix the discovery of MySQL/MariaDB and OpenBabel3.

merkys commented 3 years ago

Thank you for prompt response! I have answered in comment to #29.