esrlabs / bake

C++ build tool
http://esrlabs.github.io/bake
Other
26 stars 11 forks source link

bake command line option to set defines #168

Closed aschaal closed 6 years ago

aschaal commented 6 years ago

Instead of having multiple build configurations:

ExecutableConfig configIPV4 {
  DefaultToolchain GCC {
    Compiler CPP {
      Define "USE_IPV4"
    }
  }
}

ExecutableConfig configIPV6 {
  DefaultToolchain GCC {
    Compiler CPP {
      Define "USE_IPV6"
    }
  }
}

It would be more convenient to call it like this:

ExecutableConfig configIPVx {
  DefaultToolchain GCC
}
bake configIPVx -D USE_IPV4
bake configIPVx -D USE_IPV6
aschaal commented 6 years ago

Note to myself: if "-D" changes, the cache has to be invalided.

aschaal commented 6 years ago

Done in 2.47.0