The previous code path only happened to work incidentally. The
file(MAKE_DIRECTORY) is executed early, without the generator
expression being evaluated. The result is that the literal value is
being treated as a path. However, on Windows : is not a valid
character for a file name. This would cause the operation to fail. The
subsequent commands are delayed until runtime, and the operations will
expand the value at generation time yielding the correct result.
Details
Details
- Reviewers
JDevlieghere teemperor
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
(I'm very sorry for the delay, that slipped out of my review queue.)
Wouldn't changing this logic to an explicit get_target_property call break the multi-config projects (where there are multiple possible paths)?
I actually think the easiest solution is to just delete the file(MAKE_DIRECTORY ... line. As you described it's not doing what it should and as we create the directory in the custom command below it is redundant. I believe this line is only a remnant from when I tried to get this working in non-multi-config generator setups.