On Mon, Jul 29, 2019 at 10:32 PM Brad King <[email protected]> wrote:
>
> Even if we had that information we don't know what `main.cpp` includes
> until after compiling it, by which point it is too late.  It could have
> `#include "anything.txt"` for example.  CMake must add these pessimistic
> dependencies to ensure a correct build.
>
> The only way to avoid this is to tell CMake that there are no dependencies
> for compiling an object file by moving it to an object library that does
> not depend on any of the targets with custom commands.
>

But my custom command OUTPUT is shared library,
and in my case it would be strange to '#include' it into some source file.
So what about EXPLICIT_DEPENDS_ONLY mentioned
https://gitlab.kitware.com/cmake/cmake/issues/17097
to mark something that no way to be included into source file?
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Reply via email to