Hi,
Debugging dependencies is not always easy. The -graphviz option is a
nice try, but only seems to do the built-in target types. Is there
some way to get the whole dependency graph, including custom targets
and possibly also the individual files? Of course this can get huge.
Possibly there is some way to concentrate on anything relevant to a
particular target?
The problem I'm faced with is this:
- I have an ordinary executable target `swipl`
- To run, this requires a boot file `swipl.prc` that is created
by calling `swipl -b ...`
- I'd like to run `swipl` for creating a library index file.
So, these targets need to be built in the order above. It turns
out that sometimes step 3 runs before 2 completes. At least, this
happens on MacOS using cmake 3.11.2. So far I haven't seen it on
Linux (where I use 3.10). The definition goes like this:
add_custom_command(
OUTPUT swipl.prc
COMMAND swipl -O -b ${SWIPL_BOOT_ROOT}/init.pl
DEPENDS swipl ${SWIPL_BOOT_FILES}
)
add_custom_command(
OUTPUT ${PL_LIB_INDEX}
COMMAND swipl -f none -g
"\"make_library_index('${SWIPL_LIBRARY_ROOT}')\"" -t halt
DEPENDS swipl.prc ${PL_LIB_FILES_ALL}
)
add_custom_target(prolog_products ALL
DEPENDS swipl.prc ${PL_LIB_INDEX}
)
The first specifies building swipl.prc, the second the index
file and the custom target ensures the default build will
create both files. I don't see what is wrong and a visual
dependency graph might reveal this ...
Thanks --- Jan
--
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