You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a static library including all the moc files that are needed in our test suite (the reason is that, otherwise, meson generates thousands of build targets, since these moc files are needed by every test binary):
The problem is that the files generated by moc are written into a liball_mocs.a.p subdirectory (of tests/Core), which is not added to the include path. So, when the main target files are built, they cannot find the moc-generated files:
# (command edited with line breaks for readability)
c++ -Itests/Core/test_task_launcher.p -Itests/Core -I../tests/Core -Isrc/common \
-I../src/common -Isrc/service -I../src/service \
-I/usr/include/qt5/QtDBus -I/usr/include/qt5 -I/usr/include/qt5/QtCore \
-I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtTest \
-DUNIT_TESTS -MD -MQ \
tests/Core/test_task_launcher.p/_home_mardy_src_git_runtime-manager_src_service_Core_task_launcher.cpp.o \
-MF tests/Core/test_task_launcher.p/_home_mardy_src_git_runtime-manager_src_service_Core_task_launcher.cpp.o.d \
-o tests/Core/test_task_launcher.p/_home_mardy_src_git_runtime-manager_src_service_Core_task_launcher.cpp.o \
-c /home/mardy/src/git/runtime-manager/src/service/Core/task_launcher.cpp
/home/mardy/src/git/runtime-manager/src/service/Core/task_launcher.cpp:340:10: fatal error: task_launcher.moc: No such file or directory
340 | #include "task_launcher.moc"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
If I use include_directories: include_directories('./liball_mocs.a.p'), then following builds do work, but the first clean build won't, because meson complains that the directory does not exist. It's not clear to me why include_directories('.') does not work in this case.
The text was updated successfully, but these errors were encountered:
Describe the bug
Meson 0.6.3.
I'm trying to build a static library including all the moc files that are needed in our test suite (the reason is that, otherwise, meson generates thousands of build targets, since these moc files are needed by every test binary):
The problem is that the files generated by
moc
are written into aliball_mocs.a.p
subdirectory (oftests/Core
), which is not added to the include path. So, when the main target files are built, they cannot find the moc-generated files:If I use
include_directories: include_directories('./liball_mocs.a.p')
, then following builds do work, but the first clean build won't, because meson complains that the directory does not exist. It's not clear to me whyinclude_directories('.')
does not work in this case.The text was updated successfully, but these errors were encountered: