craftr-build / craftr-build-4.x

Frontend for the Craftr build framework.
https://craftr-build.github.io/craftr/
Other
60 stars 14 forks source link

Split targets and build rules, like Ninja does #38

Closed NiklasRosenstein closed 7 years ago

NiklasRosenstein commented 8 years ago

If you're declaring the same target with the same command over and over again, you will have the command duplicated every time in a new rule. We should split a Target into Rule and Build, just like Ninja does it. The compiler interface could look like this instead.

objects = compiler.toolset.CxxCompiler().objects(include=[...], etc..)
objects.build(path.glob('src/*.cpp'))
winksaville commented 8 years ago

LG, keeping the granularity small and building on those is a good idea, then others can combine them in different ways, but the high level interface can still remain "easy" to use!

On Wed, Dec 16, 2015 at 4:40 AM Niklas Rosenstein notifications@github.com wrote:

If you're declaring the same target with the same command over and over again, you will have the command duplicated every time in a new rule. We should split a Target into Rule and Build, just like Ninja does it. The compiler interface could look like this instead.

objects = compiler.toolset.CxxCompiler().objects(include=[...], etc..) objects.build(path.glob('src/*.cpp'))

— Reply to this email directly or view it on GitHub https://github.com/craftr-build/craftr/issues/38.

NiklasRosenstein commented 8 years ago

It's a bit out of scope for now. Maybe at a later point in the development.

NiklasRosenstein commented 7 years ago

I have been trying to approach this, however it would introduce a lot of complexity. I think for the time being I won't implement this.