I have a CMake project. For some reason (that I won't say here, but which I can provide upon request), I need some object files that are part of the same library to be compiled before others. Specifically:
FILESis a list of source filesfile_a.cis a member ofFILESfile_d.cis a member ofFILESfile_a.oMUST exist on disk beforefile_d.cis compiled
This is what I have now:
set_source_files_properties(
file_a.c
PROPERTIES
OBJECT_OUTPUTS file_a.o
)
set_source_files_properties(
file_d.c
PROPERTIES
OBJECT_DEPENDS file_a.o
)
This works well for Makefiles, but it doesn't appear to play nice with Ninja; I get a circular dependency error and complaints about multiple rules.