O'Reilly logo

CMake Cookbook by Roberto Di Remigio, Radovan Bast

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting ready

Since we wish to show and discuss how to structure a non-trivial project, we need an example that is more than a "hello world" project. We will develop a relatively simple code that can compute and print elementary cellular automata:

Our code will be able to compute any of the 256 elementary cellular automata, for instance rule 90 (Wolfram code):

$ ./bin/automata 40 15 90length: 40number of steps: 15rule: 90                    *                   * *                  *   *                 * * * *                *       *               * *     * *              *   *   *   *             * * * * * * * *            *               *           * *             * *          *   *           *   *         * * * *         * * * *        *       *       *       *       * *     * *     * *     * *      *   *   *   *   *   *   *   *     * * * * * * * * * * * * * * * *

The structure of our ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required