blitzpp / blitz

Blitz++ Multi-Dimensional Array Library for C++
https://github.com/blitzpp/blitz/wiki
Other
402 stars 83 forks source link

cmake with ninja build system can not build tests/examples/benchmarks #157

Open emmenlau opened 4 years ago

emmenlau commented 4 years ago

The very nice cmake integration has still a small impediment with the ninja build tool. I'm just collecting this here so that people are aware of it. There are a few identical executable names shared between the tests, the examples and the benchmarks. For example there is reduce in examples and testsuite. The ninja build tool is not able to handle this. And it seems since ninja 1.10, its not possible to easily work around this problem with -w dupbuild=warn anymore.

As a workaround, users can just not build this block of executables, i.e. by disabling tests. For a proper solution, I assume that the individual executables would need to have unique target names, maybe like test-reduce vs example-reduce?