This aligns our NLE cmake files with my proposal for a CMake-based NetHack-build, here and here. In particular it adds some defensive measures when building NLE with cmake after building some artefacts with NetHack's Makefile setup.
The change in of not using $<TARGET_FILE:...> generators as the COMMAND of add_custom_command comes from feedback from a PR for NetHack.
This aligns our NLE cmake files with my proposal for a CMake-based NetHack-build, here and here. In particular it adds some defensive measures when building NLE with cmake after building some artefacts with NetHack's Makefile setup.
The change in of not using
$<TARGET_FILE:...>
generators as theCOMMAND
ofadd_custom_command
comes from feedback from a PR for NetHack.