make without rebuilding everything everytime
In my package I defined a library which is linked to my executable.. the cmakelists file looks like this:
... rosbuild_add_library(mylib src/lib_src.cpp) #in the real cmake I have lot of sources in the library rosbuild_add_executable(myexe src/exe_src.cpp) target_link_libraries(myexe mylib) ...
When I run make everything is compiled. But if I run make again, everything is compiled again, even if nothing was modified.
Is it possible to compile only the changed parts? In my case would be fine to recompile the changed executable without recompiling the unchanged (and huge) library.
Thanks
Make should only compile your code if something changed. Without more information it's hard to guess a reason for the recompilation of everything.
Happy to hear that I am not expecting strange things :D which kind of information should I provide to help the debug?
For instance the actual snapshot in CMakeLists.txt you are using, not just something simplified. Also watch your clock and check the modification dates of your files. Are they maybe in the future?
heres my cmakelists: https://gist.github.com/4131480 timestamps are ok..