Open boris-kolpackov opened 2 years ago
Hi @boris-kolpackov,
Thanks for the heads up.
I tried to change it but in my quick experiment, the form benchmark/hxx{benchmark_orig}@benchmark/: install = false
form doesn't work with the current 0.15.0
release.
Is it ok to keep this issue open until 0.16.0
releases?
Hm, can you clarify what you mean by "doesn't work"? I've just tried it on a simple example, and it seems to work correctly both in 0.15.0
and 0.16.0
.
I did the following experiments:
include/buildfile
:
benchmark/hxx{benchmark_orig}@./: install = false
benchmark/hxx{benchmark_orig}@./: dist = false
Command used: b install config.install.root=../install-root && b dist config.dist.root=../install-root
Output of install:
tree ../install-root/include/benchmark
------------------------------------------------
../install-root/include/benchmark
├── benchmark.h
└── export.h
../install-root/google-benchmark-1.7.0+1/include/benchmark ├── benchmark.h └── export.h
Conclusion: The `@./:` form seems to work and not install nor distribute.
2. In `include/buildfile`:
benchmark/hxx{benchmark_orig}@benchmark/: install = false benchmark/hxx{benchmark_orig}@benchmark/: dist = false
Command used: `b install config.install.root=../install-root && b dist config.dist.root=../install-root`
Output of install:
../install-root/include/benchmark ├── benchmark.h └── export.h
../install-root/google-benchmark-1.7.0+1/include/benchmark ├── benchmark.h └── export.h
Conclusion: The `@benchmark/:` form seems to work and does not install nor distribute.
3. In `include/buildfile`:
benchmark/hxx{benchmark_orig}@./: install = true benchmark/hxx{benchmark_orig}@./: dist = true
Command used: `b install config.install.root=../install-root && b dist config.dist.root=../install-root`
Output of install:
../install-root/include/benchmark ├── benchmark.h └── export.h
../install-root/google-benchmark-1.7.0+1/include/benchmark ├── benchmark.h ├── benchmark_orig.h └── export.h
Conclusion: The `@./:` does not work as intended. `install` doesn't actually install `hxx[benchmark_orig}`, however, `dist` distributes the file correctly.
4. In `include/buildfile`:
benchmark/hxx{benchmark_orig}@benchmark/: install = true benchmark/hxx{benchmark_orig}@benchmark/: dist = true
Command used: `b install config.install.root=../install-root && b dist config.dist.root=../install-root`
Output of install:
../install-root/include/benchmark ├── benchmark.h └── export.h
../install-root/google-benchmark-1.7.0+1/include/benchmark ├── benchmark.h ├── benchmark_orig.h └── export.h
Conclusion: The `@benchmark/:` does not work as intended. `install` doesn't actually install `hxx[benchmark_orig}`, however, `dist` distributes the file correctly.
In general both `@./` and `@benchmark/` form seem to work in the same manner ---> So yes, the change can be done now.
However, there is a difference between how `install` and `dist` are behaving. Any idea why `hxx{benchmark_orig}` doesn't install? Is it because `hxx{benchmark_orig}` is not a dependency of `./`?
Any idea why
hxx{benchmark_orig}
doesn't install? Is it becausehxx{benchmark_orig}
is not a dependency of./
?
Yes, if it's not a prerequisite of any target, then it won't be installed (unlike dist
, which considers any mentioned in the buildfile
targets).
There are lines in
buildfile
in the form:Which need to be corrected to read:
In the upcoming 0.16.0 release these will cause warnings but in 0.17.0 it will be changed to error.
Below is the list of affected packages.