Closed NiklasRosenstein closed 7 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.
It's a bit out of scope for now. Maybe at a later point in the development.
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.
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
intoRule
andBuild
, just like Ninja does it. The compiler interface could look like this instead.