0

I have a mixed C++ and Ada project. A GPRbuild project is used to build it and there is no makefile.

There is a script which creates an H file with constants such as build host, username and git commit.

How do I run the script before compiling the file that import its result?

I did not find a gprbuild option for pre/post build steps, probably because it breaks portability.

What is the common practice in this case?

2
  • 1
    Why not run gprbuild from the script? Commented Nov 2, 2024 at 11:17
  • @JeffreyR.Carter No, I want to run the script before compilation step in gprbuild. Commented Nov 2, 2024 at 12:41

1 Answer 1

1

You can't do this with gprbuild (for now?). Try to use Alire. It's fantastic for dependency management and can run simple post-fetch, pre-build, post-build actions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.