Closed jmgao closed 4 years ago
This is intentional, but it's arguably the wrong move. I'm not sure though whether intermediate files should be considered intermediate by their type (e.g. .o
files) or by whether they're implicitly generated, as in this case.
I'm going to try to make sure I have an answer for this (even if it's WONTFIX; I haven't decided) by 0.5.
Currently, I have a patch for this to put implicitly-defined object files (i.e. object files generated by passing source files to executable
and friends) into an intermediate dir based on the name of the resulting executable/library. I'm debating whether this should be enabled by default or not though. Personally, I prefer not having intermediate dirs since it matches the structure of the srcdir better (and since I always put source files in src/
, I don't run into conflicts). However, defaulting to intermediate dirs ensures that more stuff Just Works, like the case in the initial comment.
Decisions, decisions...
Resolved, with an opt-out: project(intermediate_dirs=False)
Collisions can occur between intermediate outputs and final outputs right now, since they're dumped in the same folder.
The build file:
will create a ninja file with these conflicting targets: