User forums > Using Code::Blocks
Make commands
oBFusCATed:
Have you read the link I've posted?
None of the four lines is valid in codeblocks!
Also you don't have to use a pre-build step for this.
sorinev:
I did read the links, I still couldn't quite gather what I was supposed to do.
oBFusCATed:
Something like - in the defines section MYDEFINE=`command-that-will-produce-the-required-output`. You can probably use custom variable or this, too.
sorinev:
I ended up going to the #defines tab of the Compiler Settings and putting this there:
--- Code: ---BUILD_VERSION=\"`git describe --abbrev=5 --dirty --always --tags`\"
--- End code ---
which worked as I needed it to.
oBFusCATed:
Just keep in mind that the output of backtick expressions are cached and you have to restart cb in order to get a new value!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version