[CMake] make[2]: *** No rule to make target 'sql/sql_yacc.cc', needed by 'libmysqld/CMakeFiles/sql_embedded.dir/__/sql/sql_yacc.cc.o'. Stop.

Bruce Stephens bruce.r.stephens at gmail.com
Mon Mar 4 07:00:10 EST 2019


On Mon, 4 Mar 2019 at 04:00, Yu, Mingli <mingli.yu at windriver.com> wrote:

> Is there any means to make the logic run in /source/sql/CMakeLists.txt
> before which is in /source/libmysqld/CMakeLists.txt?

Use a dependency between targets. There's a limitation/bug with things
that depend on files created by add_custom_command() in different
directories (different CMakeLists,txt files). So create a target for
the generated file (in the directory where it's created), and use
add_dependencies() for the thing that uses the file.


More information about the CMake mailing list