One of the users I support complained about the following:

add_library(foo a.c b.c)
add_library(bar a.c c.c)

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.

Is it possible to convince cmake to automatically figure out it doesn'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?

thanks
b.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to