[CMake] Detailed graphviz graph?

Eric Noulard eric.noulard at gmail.com
Sun Oct 7 05:47:41 EDT 2018


Le sam. 6 oct. 2018 à 18:15, Jan Wielemaker <jan at swi-prolog.org> a écrit :

> On 03/10/18 09:53, Eric Noulard wrote:
> >
> > Are those three add_custom_xxx in the same directory?
> > DEPENDS for custom_xxx do not cross directory.
>
> So this was not the problem. The problem was that on the Mac I had build
> the system before using the autoconf/make suite, which had created
> `swipl.prc` in the source tree. Now, this is the second time I've been
> fooled by this:
>

Good to know you've found the issue.


> If a custom command has a DEPENDS, this points at the
> CMAKE_CURRENT_SOURCE_DIR if the file exists there and at the
> CMAKE_CURRENT_BINARY_DIR otherwise.  This makes sense, but
> easily leads to things that are hard to figure out ...
>

I've already been bitten by that kind of issue.
Now when I want to be "extra-sure" of my source/build tree state I:

- remove the build tree completely
- use the VCS at hand to clean the source tree, e.g. with git
  git -fdx being in the root source dir should remove all non versioned
files (or directories) including ignore ones.
(there are more interesting feature to git-clean:
https://git-scm.com/docs/git-clean)

Then you can be sure to have a "clean" starting point.
Alternatively checking out the project in a separate place works as well.

Thanks. In particular for pointing at Ninja's tools for figuring out
> dependencies.
>

You are welcome.

-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20181007/a63ea51b/attachment.html>


More information about the CMake mailing list