One of the users I support complained about the following:<br><br>add_library(foo a.c b.c)<br>add_library(bar a.c c.c)<br><br>because a.c will be compiled twice (the real case is more complex of course but essentially the same thing with more files). While its possible to pull a.c out into a library and link against it, this adds complexity for the end users who need to think about it while updating the build files.<br>
<br>Is it possible to convince cmake to automatically figure out it doesn&#39;t need to compile a.c twice, or at least to warn about the redundant compilation so the user can realize what is happening and work around it?<br>
<br>thanks<br>b.<br>