Skip to content

Ninja Dictionary Generation Fix, master branch (2021.07.27.)

As it turns out, CMake changed its convention for how dependency files should be formatted in a way that makes it impossible to generate these files in a way that would work with all versions of CMake. With CMake <3.20 the file name in the dependency file must be relative to ${CMAKE_BINARY_DIR}. (An absolute path name does not work!) While in >=3.20 it must be either an absolute path name, or relative to ${CMAKE_CURRENT_BINARY_DIR}.

So now the dependency file generation is set up to work a little differently for different CMake versions. 😠

At the same time made sure that DEPFILE and IMPLICIT_DEPENDS would not be specified at the same time, as that is now apparently an error in CMake >=3.20.

https://cmake.org/cmake/help/v3.20/command/add_custom_command.html

This is meant to fix the issue described by @tadej in ATLINFR-4186.

Merge request reports