I want to add a post build event to llvm's clang using cmake, but i just can't figure out where. The event should occur after every build of clang, without considering changes.
Asked
Active
Viewed 952 times
1 Answers
1
You need add_custom_command() function with TARGET
signature and POST_BUILD
keyword.
e.g.
add_custom_command(TARGET mytarget POST_BUILD
COMMAND scp mytarget foo@bar
)

Mark Lakata
- 19,989
- 5
- 106
- 123

arrowd
- 33,231
- 8
- 79
- 110
-
ok, but where should the add_custom_command() function be placed ? – marius c Apr 30 '12 at 11:18
-
Somewhere in one of `CMakeLists.txt`s. For example, right after target declaration for which you wish to add post-build step. – arrowd Apr 30 '12 at 12:32