1

Is there any way to add a post build command to an omakefile? I want it to automatically run unit tests everytime a build is successful, but am not sure of the best way to do this.

a_m0d
  • 12,034
  • 15
  • 57
  • 79

2 Answers2

1

You can add commands to the .DEFAULT target. For example:

FILES[] =
    ...

CXXProgram(unittests, $(FILES))

.DEFAULT: unittests$(EXE)
    ./unittests$(EXE)

When invoked without any particular target, Omake will build all default targets, then run associated commands.

small_duck
  • 3,038
  • 20
  • 28
0

I think you can use .BUILD_SUCCESS and .BUILD_FAILURE targets for that purpose. See details here.

Mikhail
  • 1,223
  • 14
  • 25