-
Notifications
You must be signed in to change notification settings - Fork 2
Tasks
Plaristote edited this page Mar 3, 2016
·
3 revisions
Tasks are binaries which are linked to the application library. They can perform anything the application would, but they do it in a separate process.
To create a new task use the following command
$> crails task add my_task
This will create a new directory tasks/my_task. It contains two files:
- The
CMakeLists.txtfile is used during your application build to generate the task's binary. - The
main.cppfile contains the entry point of your task (themainfunction).
The crails task add command automatically adds your task to your application's CMakeLists.txt file. Your task will be built along with your application.
If your build directory is called build, then the binary for a task named my_task would end up in build/tasks/my_task/task.
You must run the task from the root directory of your application:
$> build/tasks/my_task/task [arguments]