diff --git a/chapter-06/recipe-02/README.md b/chapter-06/recipe-02/README.md index 9506e6843..fe024c0cb 100644 --- a/chapter-06/recipe-02/README.md +++ b/chapter-06/recipe-02/README.md @@ -2,7 +2,7 @@ In this recipe, we generate `print_info.c` from the template `print_info.c.in` by emulating the CMake function -[configure_file](https://cmake.org/cmake/help/latest/command/configure_file.html) +[`configure_file`](https://cmake.org/cmake/help/latest/command/configure_file.html) with a custom Python script. The goal of this recipe is to learn how we can generate source code at @@ -10,17 +10,17 @@ configure time. We should point out that this recipe has a serious limitation and cannot emulate -[configure_file](https://cmake.org/cmake/help/latest/command/configure_file.html) +[`configure_file`](https://cmake.org/cmake/help/latest/command/configure_file.html) fully. The approach that we present here cannot generate an automatic dependency which would regenerate `print_info.c` at build time. In other words, if you remove the generated `print_info.c` after the configure step, this file will not be regenerated and the build step will fail. To proper mimic the behavior of -[configure_file](https://cmake.org/cmake/help/latest/command/configure_file.html) +[`configure_file`](https://cmake.org/cmake/help/latest/command/configure_file.html) we would require -[add_custom_command](https://cmake.org/cmake/help/latest/command/add_custom_command.html) +[`add_custom_command`](https://cmake.org/cmake/help/latest/command/add_custom_command.html) and -[add_custom_target](https://cmake.org/cmake/help/latest/command/add_custom_target.html), +[`add_custom_target`](https://cmake.org/cmake/help/latest/command/add_custom_target.html), which we will use in the subsequent [Recipe 3, *Generating source code at build time using Python*](../recipe-03), where we will overcome this limitation. diff --git a/chapter-06/recipe-02/abstract.md b/chapter-06/recipe-02/abstract.md index fc897afc3..8318efd2b 100644 --- a/chapter-06/recipe-02/abstract.md +++ b/chapter-06/recipe-02/abstract.md @@ -1,6 +1,6 @@ In this recipe, we generate `print_info.c` from the template `print_info.c.in` by emulating the CMake function -[configure_file](https://cmake.org/cmake/help/latest/command/configure_file.html) +[`configure_file`](https://cmake.org/cmake/help/latest/command/configure_file.html) with a custom Python script. The goal of this recipe is to learn how we can generate source code at @@ -8,16 +8,16 @@ configure time. We should point out that this recipe has a serious limitation and cannot emulate -[configure_file](https://cmake.org/cmake/help/latest/command/configure_file.html) +[`configure_file`](https://cmake.org/cmake/help/latest/command/configure_file.html) fully. The approach that we present here cannot generate an automatic dependency which would regenerate `print_info.c` at build time. In other words, if you remove the generated `print_info.c` after the configure step, this file will not be regenerated and the build step will fail. To proper mimic the behavior of -[configure_file](https://cmake.org/cmake/help/latest/command/configure_file.html) +[`configure_file`](https://cmake.org/cmake/help/latest/command/configure_file.html) we would require -[add_custom_command](https://cmake.org/cmake/help/latest/command/add_custom_command.html) +[`add_custom_command`](https://cmake.org/cmake/help/latest/command/add_custom_command.html) and -[add_custom_target](https://cmake.org/cmake/help/latest/command/add_custom_target.html), +[`add_custom_target`](https://cmake.org/cmake/help/latest/command/add_custom_target.html), which we will use in the subsequent [Recipe 3, *Generating source code at build time using Python*](../recipe-03), where we will overcome this limitation. diff --git a/chapter-06/recipe-05/README.md b/chapter-06/recipe-05/README.md index c14a1b179..70f0e940e 100644 --- a/chapter-06/recipe-05/README.md +++ b/chapter-06/recipe-05/README.md @@ -1,7 +1,7 @@ # Recording the project version from a file -The goal of this recipe is similar to [Recipe 4](../recipe-04), but the -starting point is different; our plan is to read the version information from a +The goal of this recipe is similar to [Recipe 4, *Recording the project version information for reproducibility*](../recipe-04), +but the starting point is different; our plan is to read the version information from a file, rather than setting it inside of `CMakeLists.txt`. The motivation for keeping the version in a separate file, outside of CMake diff --git a/chapter-06/recipe-05/abstract.md b/chapter-06/recipe-05/abstract.md index 1128225d7..560f7397a 100644 --- a/chapter-06/recipe-05/abstract.md +++ b/chapter-06/recipe-05/abstract.md @@ -1,5 +1,5 @@ -The goal of this recipe is similar to [Recipe 4](../recipe-04), but the -starting point is different; our plan is to read the version information from a +The goal of this recipe is similar to [Recipe 4, *Recording the project version information for reproducibility*](../recipe-04), +but the starting point is different; our plan is to read the version information from a file, rather than setting it inside of `CMakeLists.txt`. The motivation for keeping the version in a separate file, outside of CMake diff --git a/chapter-06/recipe-07/README.md b/chapter-06/recipe-07/README.md index 2551c3070..3dd56506f 100644 --- a/chapter-06/recipe-07/README.md +++ b/chapter-06/recipe-07/README.md @@ -1,6 +1,7 @@ # Recording the Git hash at build time -In [Recipe 6](../recipe-06), we recorded the state of the code repository +In [Recipe 6, *Recording the Git hash at configure time*](../recipe-06), +we recorded the state of the code repository (Git hash) at configure time. In this recipe, we wish to go a step further and demonstrate how to record the Git hash (or, generally, perform other actions) at build time, to make sure that these actions are run every time we build the diff --git a/chapter-06/recipe-07/abstract.md b/chapter-06/recipe-07/abstract.md index e2be9c812..0395910b0 100644 --- a/chapter-06/recipe-07/abstract.md +++ b/chapter-06/recipe-07/abstract.md @@ -1,4 +1,5 @@ -In [Recipe 6](../recipe-06), we recorded the state of the code repository +In [Recipe 6, *Recording the Git hash at configure time*](../recipe-06), +we recorded the state of the code repository (Git hash) at configure time. In this recipe, we wish to go a step further and demonstrate how to record the Git hash (or, generally, perform other actions) at build time, to make sure that these actions are run every time we build the diff --git a/chapter-08/recipe-01/README.md b/chapter-08/recipe-01/README.md index c6d5c1fa3..c539a731a 100644 --- a/chapter-08/recipe-01/README.md +++ b/chapter-08/recipe-01/README.md @@ -2,7 +2,7 @@ This recipe introduces the superbuild pattern with a very simple example. We will show how to use the -[ExternalProject_Add](https://cmake.org/cmake/help/latest/module/ExternalProject.html) +[`ExternalProject_Add`](https://cmake.org/cmake/help/latest/module/ExternalProject.html) command to build a simple "Hello, World" program. diff --git a/chapter-08/recipe-01/abstract.md b/chapter-08/recipe-01/abstract.md index c751c45a6..a37f1b571 100644 --- a/chapter-08/recipe-01/abstract.md +++ b/chapter-08/recipe-01/abstract.md @@ -1,4 +1,4 @@ This recipe introduces the superbuild pattern with a very simple example. We will show how to use the -[ExternalProject_Add](https://cmake.org/cmake/help/latest/module/ExternalProject.html) +[`ExternalProject_Add`](https://cmake.org/cmake/help/latest/module/ExternalProject.html) command to build a simple "Hello, World" program. diff --git a/chapter-08/recipe-04/README.md b/chapter-08/recipe-04/README.md index 5e59a28ca..2170dccdd 100644 --- a/chapter-08/recipe-04/README.md +++ b/chapter-08/recipe-04/README.md @@ -2,11 +2,11 @@ In this recipe we reuse the code from [Recipe 3 in Chapter 4](../../chapter-04/recipe-03) and fetch and build the [Google Test](https://github.com/google/googletest) framework -using [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html), +using [`FetchContent`](https://cmake.org/cmake/help/latest/module/FetchContent.html), which provides a compact and versatile module to assemble project dependencies at configure time. For additional insight -and for CMake below 3.11, we will also discuss how to emulate [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) using -[ExternalProject_Add](https://cmake.org/cmake/help/latest/module/ExternalProject_Add.html) +and for CMake below 3.11, we will also discuss how to emulate [`FetchContent`](https://cmake.org/cmake/help/latest/module/FetchContent.html) using +[`ExternalProject_Add`](https://cmake.org/cmake/help/latest/module/ExternalProject_Add.html) at configure time. diff --git a/chapter-08/recipe-04/abstract.md b/chapter-08/recipe-04/abstract.md index 7fad142cb..53538d599 100644 --- a/chapter-08/recipe-04/abstract.md +++ b/chapter-08/recipe-04/abstract.md @@ -1,8 +1,8 @@ In this recipe we reuse the code from [Recipe 3 in Chapter 4](../../chapter-04/recipe-03) and fetch and build the [Google Test](https://github.com/google/googletest) framework -using [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html), +using [`FetchContent`](https://cmake.org/cmake/help/latest/module/FetchContent.html), which provides a compact and versatile module to assemble project dependencies at configure time. For additional insight -and for CMake below 3.11, we will also discuss how to emulate [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) using -[ExternalProject_Add](https://cmake.org/cmake/help/latest/module/ExternalProject_Add.html) +and for CMake below 3.11, we will also discuss how to emulate [`FetchContent`](https://cmake.org/cmake/help/latest/module/FetchContent.html) using +[`ExternalProject_Add`](https://cmake.org/cmake/help/latest/module/ExternalProject_Add.html) at configure time. diff --git a/chapter-08/recipe-05/README.md b/chapter-08/recipe-05/README.md index cd4ea056f..66425a549 100644 --- a/chapter-08/recipe-05/README.md +++ b/chapter-08/recipe-05/README.md @@ -1,7 +1,7 @@ # Managing your project as a superbuild This recipe shows how to use -[ExternalProject_Add](https://cmake.org/cmake/help/latest/module/ExternalProject_Add.html) +[`ExternalProject_Add`](https://cmake.org/cmake/help/latest/module/ExternalProject_Add.html) to handle dependencies available from open source Git repositories. As an example we will build a project which depends on https://github.com/dev-cafe/message. diff --git a/chapter-08/recipe-05/abstract.md b/chapter-08/recipe-05/abstract.md index b0605a5f6..a5de23619 100644 --- a/chapter-08/recipe-05/abstract.md +++ b/chapter-08/recipe-05/abstract.md @@ -1,5 +1,5 @@ This recipe shows how to use -[ExternalProject_Add](https://cmake.org/cmake/help/latest/module/ExternalProject_Add.html) +[`ExternalProject_Add`](https://cmake.org/cmake/help/latest/module/ExternalProject_Add.html) to handle dependencies available from open source Git repositories. As an example we will build a project which depends on https://github.com/dev-cafe/message.