To compile our HelloWorld application, we will use CMake.
Here is the list of commands to complete to compile and launch our application:
At the beginning of this list, we define variables to make everything more readable and easily modifiable.
This line allows us to define the installation directory of Arcane.
This line allows us to define the directory containing the sources for our HelloWorld.
This line allows us to define the directory where our application will be compiled.
This line allows us to define the desired build type. We have the choice between Debug, Check, and Release. Debug allows us to have additional information to debug with a debugger. Check allows us to add extra checks to prevent problems like array overflow.
Using the information we provided previously, we can deduce the location of the executable (HW_EXE) and the location of our dataset (HW_ARC).
Personally, I prefer to be in the build folder for the following commands, so I execute a cd ${HW_BUILD_DIR}, but this remains optional.
We ask CMake to configure the build directory using the CMakeLists.txt files so that Make can compile our project. This command will not modify the directory containing our project sources (this is true for all the commands presented here, by the way).
We ask CMake to call Make to compile our project. We could use the make command directly, but if one day we want to use a program other than Make (like Ninja), we will have to change this command. Currently, CMake handles it according to the configuration made previously.
Finally, we can launch our HelloWorld! We must also specify the location of our dataset. If we have multiple datasets, we just need to change the ${HW_ARC} variable and relaunch HelloWorld without needing to recompile.
That concludes this subsection dedicated to building a hello world with Arcane. The basics are presented here. Nevertheless, to go further, it is recommended to read all chapters of this documentation.
If there is a problem in this subsection, you can open an issue on the Arcane GitHub.