-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add recipe titles to cross-refs and monospace commands
- Loading branch information
Showing
12 changed files
with
28 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
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 | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |