Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake with makefiles: add a sound at the end of build

Tags:

linux

cmake

Working under Linux on a big project taking some time to build, I would like to add a sound at the end of the build. How can I do that with CMake?

My first idea is to add a command like

add_custom_target(DONG ALL COMMAND aplay ${PathDong} &)

but I don't know how to create the dependency on all the targets (to be sure to play it after all). Is there a global target depending on all the targets defined?

Note: I need it at the end of the build, not at the end of installation (that is easy).

like image 548
Caduchon Avatar asked Aug 23 '16 11:08

Caduchon


1 Answers

Use a script.

The script executes CMake, and after that it plays a sound. There are several solutions for this described in this post.

like image 152
TobiMcNamobi Avatar answered Sep 24 '22 04:09

TobiMcNamobi