Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to get Eclipse CDT to force build of a CMake generated project, disregarding freshness of resources?

I've found myself in an odd pattern using Eclipse. I have a project which depends on resources which are not properly accounted for in the eclipse project such that if I update only a header in the dependency Eclipse refuses to build when commanded to, apparently because it doesn't think it's necessary. As a result I end up constantly adding one space to a file and saving to get the CDT to do my bidding.

While it would be possible to integrate the dependencies into the project settings, the project is occasionally rewritten by the CMake auto-generate tool (which I have no interest in patching) which would overwrite the config, and require that I reconfigure the dependencies again and again.

What I'd like to be able to do is simply just tell Eclipse that it should ignore what it thinks should happen and obey the build command, and let the underlying make system do it's job (of determining what should and shouldn't be built).

TL;DR:

  • Eclipse CDT attempts to determine whether to build by watching the freshness of files
  • It only watches properly set up dependencies
  • I don't want to set up the dependencies because project frequently overwritten by CMake when I add files to the project

Anyone know how to override CDT's decision and force a build?

like image 754
Catskul Avatar asked Nov 05 '22 01:11

Catskul


1 Answers

I am facing the same problem, I am developing a program in two parts (two static libraries), if I make a rebuild to one library, the Eclipse won't update the other, because it apparently doesn't watch for changes on static libraries.

The solution is to "Clean" the project before every build (Right click on a project -> Clean project) and then do the build. This effectivelly deletes all previous build results and starts building from scratch. I haven't figured yet out how to do it in a single button click, but this works for me.

like image 144
Jakub Zaverka Avatar answered Nov 09 '22 13:11

Jakub Zaverka