Configuring on OSX and *nix

Once the build directory is set up and it is the current directory, we can configure using CMake.

When using CMake from the command line, the main thing it needs to know is where the “source” directory is. If you are new to CMake, this is the directory containing the top-level CMakeLists.txt file. In our case, CMakeLists.txt is in the root of the VoroCrus repository. So we’ll execute cmake <directory containing CMakeLists.txt>. In our case, since we are in the build directory we just need to execute this command:

$ cmake ../.

And CMake should run its configuration steps. Your output should look something like the following:

Image of Screenshot-from-2022-12-22-09-51-57
Partial CMake output on the command line (RHEL8).

If this step is successful then you will see something similar to: Build files have been written to: /home/jhsharp/VoroCrust/vorocrust-meshing/build as the last line of output.

Note: on OSX there is a potential gotcha. If you get OpenMP errors during build time, check the first lines of output from CMake. If the “CXX compiler identification” line indicates the compiler being found is something like “Apple Clang” then CMake grabbed the default C++ compiler that comes with XCode which is known to not work since Apple does not provide OpenMP with their compiler. If you see this, refer to the C++ compiler section in the Prerequisites guide.

If you successfully configured the code, then the next step is to compile it.


‹ Building on Windows | Building on OSX and *nix ›