Documentation Home
MySQL Internals Manual

4.4.10 Developer CMake Tips

  • How to find out which compiler/linker flags are used

    When using a Makefile generator, it is easy to examine which compiler flags are used to build. For example, compiler flags for mysqld are in sql/CMakeFiles/mysqld.dir/flags.make under the build directory and the linker command line is in sql/CMakeFiles/mysqld.dir/ulink.txt.

  • What is CMakeCache.txt?

    CMake caches results of platform checks in CMakeCache.txt. It is a nice feature because such tests then need not be rerun when reconfiguring (for example, after a new test is added).The downside of caching is that when a platform test was wrong and was later corrected, the cached result is still used. If you encounter this situation (which should be rare), you must either remove the offending entry from CMakeCache.txt (if test was for HAVE_FOO, remove lines containing HAVE_FOO) or just remove the cache file.