Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime/CMakeLists.txt: Depend only on the full path to the ldc binary
For custom commands that require a built ldc2 specify only an absolute path to compiler binary, not the target name. This is because cmake handles file paths and target dependencies differently. In the case of a target dependency the dependency doesn't actually apply to the `add_custom_command`, it only affects future targets. As an example, we want to built libruntime.a from a D file foo.d. What we need to describe is: 1. compile foo.o from foo.d (depends on LDC) 2. archive libruntime.a from foo.o If we use ${LDC_EXE} as a dependency (only the target name) cmake would generate: 1. compile foo.o from foo.d 2. archive libruntime.a from foo.o (depends on LDC) Using an absolute path for the LDC dependency does what we want it to do. Signed-off-by: Andrei Horodniceanu <[email protected]>
- Loading branch information