Hi there,
I’m in the unfortunate position that I need to produce particular build rules given my specific build tools.
I’m using CMake + Ninja Generator in a particular controled version (3.18).
I found out about the (discouraged, yet working) CMAKE_C_COMPILE_OBJECT and CMAKE_C_LINK_EXECUTABLE variables, in order to shuffle the argument groups.
-
I could not find a way to suppress Depfile information with the Ninja generator. I could however remove them in the generated rules.ninja and ninja indeed did not produce depfile arguments. Is there a (maybe undocumented) way to disable depfile tracking for a particular build configuration, so that I do not have to modify the rules.ninja after generating?
-
Or alternatively, is there a way to select between MMD and MD on a gnu toolchain and change the particular order of depfile arguments?
-
I looked for a way to get the Linker-Search-Directories at the front of the linker command line, but CMAKE_C_LINK_EXECUTABLE somehow does not have a dedicated element for it, seemingly. However, inside the generated rules.ninja they do show up as a seperate argument to the rule, so there must be some logic to keep them apart internally. Is there maybe a way to control the placement of linker search directories in CMake?
Thanks in advance
Michael