When building a C++ app with Qt6 I get the following error message after the build is finished:
/home/me/projects/Testapp/build> make -j24 CMakeLists.o
make: *** No rule to make target ‘CMakeLists.o’. Stop.
*** Failure: Exit code 2 ***
The previous output (before the error message) is:
/home/me/projects/Testapp/build> /usr/bin/cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release /home/me/projects/Testapp
— Configuring done (0.1s)
— Generating done (0.0s)
— Build files have been written to: /home/me/projects/Testapp/build
*** Finished ***
But it becomes hidden by the error message. If I disturb CMakeLists (e.g. add a space) and rebuild the project once or twice the error message sometimes is shown briefly and then disappears. Looks like some kind of race condition.
My app is working as expected, but I am puzzled as to why the above error message appears after the build is finished. And I have no idea what is meant by ‘CMakeLists.o’. Any suggestions?
cmake version: 3.28.3
cpp version 13.2.0
OS: Kubuntu 24.04
IDE: KDevelop 5.12.230805