Skip to content

Commit

Permalink
Add abstracts for chapter 5
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodr committed Sep 23, 2018
1 parent 9ffcbfd commit e5e8261
Show file tree
Hide file tree
Showing 19 changed files with 91 additions and 26 deletions.
6 changes: 5 additions & 1 deletion chapter-05/recipe-01/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Using platform-independent file operations

Abstract to be written ...
This recipe will show how to run operations on files, such as uncompressing a
archive or renaming a folder, in a platform-independent fashion.
CMake can in fact be used in [command-line tool mode](https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#command-line-tool-mode)
and offers a number of wrappers to many common operations.


- [cxx-example](cxx-example/)
4 changes: 4 additions & 0 deletions chapter-05/recipe-01/abstract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This recipe will show how to run operations on files, such as uncompressing a
archive or renaming a folder, in a platform-independent fashion.
CMake can in fact be used in [command-line tool mode](https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#command-line-tool-mode)
and offers a number of wrappers to many common operations.
6 changes: 5 additions & 1 deletion chapter-05/recipe-02/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Running a custom command at configure time

Abstract to be written ...
We will show how to run a custom command at configure time using the built-in
[`execute_process`] command offered by CMake.

[`execute_process`]: https://cmake.org/cmake/help/latest/command/execute_process.html


- [example](example/)
4 changes: 4 additions & 0 deletions chapter-05/recipe-02/abstract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
We will show how to run a custom command at configure time using the built-in
[`execute_process`] command offered by CMake.

[`execute_process`]: https://cmake.org/cmake/help/latest/command/execute_process.html
6 changes: 5 additions & 1 deletion chapter-05/recipe-03/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Running a custom command at build time: I. Using `add_custom_command`

Abstract to be written ...
This recipe will show how to use [`add_custom_target`] to add new targets with
custom build goals to the build system.

[`add_custom_target`]: https://cmake.org/cmake/help/latest/command/add_custom_target.html


- [cxx-example](cxx-example/)
4 changes: 4 additions & 0 deletions chapter-05/recipe-03/abstract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This recipe will show how to use [`add_custom_target`] to add new targets with
custom build goals to the build system.

[`add_custom_target`]: https://cmake.org/cmake/help/latest/command/add_custom_target.html
3 changes: 2 additions & 1 deletion chapter-05/recipe-04/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Running a custom command at build time: II. Using `add_custom_target`

Abstract to be written ...
Running a custom command at build time: II. Using `add_custom_target`


- [cxx-example](cxx-example/)
1 change: 1 addition & 0 deletions chapter-05/recipe-04/abstract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Running a custom command at build time: II. Using `add_custom_target`
7 changes: 6 additions & 1 deletion chapter-05/recipe-05/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Running custom commands for specific targets at build time

Abstract to be written ...
[`add_custom_command`] can be used to attach execution of additional commands
for specific targets at specific moments during build time. This recipe will
show you how.

[`add_custom_command`]: https://cmake.org/cmake/help/latest/command/add_custom_command.html


- [fortran-example](fortran-example/)
5 changes: 5 additions & 0 deletions chapter-05/recipe-05/abstract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[`add_custom_command`] can be used to attach execution of additional commands
for specific targets at specific moments during build time. This recipe will
show you how.

[`add_custom_command`]: https://cmake.org/cmake/help/latest/command/add_custom_command.html
10 changes: 7 additions & 3 deletions chapter-05/recipe-06/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Probing compilation and linking

We show the usage of `check_<lang>_source_compiles` to check that a small code
snippet compiles. This will be contrasted with `try_compile`. Finally, we
discuss how to troubleshoot `try_compile` to avoid false negatives and false positives.
We show the usage of `check_<lang>_source_compiles` (where `<lang>` can be [C](https://cmake.org/cmake/help/latest/module/CheckCSourceCompiles.html),
[CXX](https://cmake.org/cmake/help/latest/module/CheckCXXSourceCompiles.html) or
[Fortran](https://cmake.org/cmake/help/latest/module/CheckFortranSourceCompiles.html)) to check that a small code
snippet compiles. This will be contrasted with [`try_compile`]. Finally, we
discuss how to troubleshoot [`try_compile`] to avoid false negatives and false positives.

[`try_compile`]: https://cmake.org/cmake/help/latest/command/try_compile.html


- [cxx-example](cxx-example/)
Expand Down
10 changes: 7 additions & 3 deletions chapter-05/recipe-06/abstract.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
We show the usage of `check_<lang>_source_compiles` to check that a small code
snippet compiles. This will be contrasted with `try_compile`. Finally, we
discuss how to troubleshoot `try_compile` to avoid false negatives and false positives.
We show the usage of `check_<lang>_source_compiles` (where `<lang>` can be [C](https://cmake.org/cmake/help/latest/module/CheckCSourceCompiles.html),
[CXX](https://cmake.org/cmake/help/latest/module/CheckCXXSourceCompiles.html) or
[Fortran](https://cmake.org/cmake/help/latest/module/CheckFortranSourceCompiles.html)) to check that a small code
snippet compiles. This will be contrasted with [`try_compile`]. Finally, we
discuss how to troubleshoot [`try_compile`] to avoid false negatives and false positives.

[`try_compile`]: https://cmake.org/cmake/help/latest/command/try_compile.html
14 changes: 10 additions & 4 deletions chapter-05/recipe-07/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Probing compiler flags

We show the usage of `check_<lang>_compiler_flag` to check for the availability
of compiler flags. The example will show how to set compiler flags for the
sanitizers (address, memory, thread and undefined behavior) which require the
flag to be passed also to the linker.
We show the usage of `check_<lang>_compiler_flag`
(where `<lang>` can be [C](https://cmake.org/cmake/help/latest/module/CheckCCompilerFlags.html),
[CXX](https://cmake.org/cmake/help/latest/module/CheckCXXCompilerFlags.html) or
[Fortran](https://cmake.org/cmake/help/latest/module/CheckFortranCompilerFlags.html))
to check for the availability of compiler flags.
The example will show how to set compiler flags for the sanitizers (address,
memory, thread and undefined behavior) which require the flag to be passed also
to the linker.
This function is available for Fortran since CMake 3.3.

We will expand on this example in [Recipe 3 in Chapter 7](../../chapter-07/recipe-03)


- [cxx-example](cxx-example/)
14 changes: 10 additions & 4 deletions chapter-05/recipe-07/abstract.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
We show the usage of `check_<lang>_compiler_flag` to check for the availability
of compiler flags. The example will show how to set compiler flags for the
sanitizers (address, memory, thread and undefined behavior) which require the
flag to be passed also to the linker.
We show the usage of `check_<lang>_compiler_flag`
(where `<lang>` can be [C](https://cmake.org/cmake/help/latest/module/CheckCCompilerFlags.html),
[CXX](https://cmake.org/cmake/help/latest/module/CheckCXXCompilerFlags.html) or
[Fortran](https://cmake.org/cmake/help/latest/module/CheckFortranCompilerFlags.html))
to check for the availability of compiler flags.
The example will show how to set compiler flags for the sanitizers (address,
memory, thread and undefined behavior) which require the flag to be passed also
to the linker.
This function is available for Fortran since CMake 3.3.

We will expand on this example in [Recipe 3 in Chapter 7](../../chapter-07/recipe-03)
6 changes: 4 additions & 2 deletions chapter-05/recipe-08/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Probing execution

We show how to use `check_<language>_source_runs` to compile, link and run a
test executable.
We show how to use `check_<language>_source_runs`
(where `<lang>` can be [C](https://cmake.org/cmake/help/latest/module/CheckCSourceRuns.html) or
[CXX](https://cmake.org/cmake/help/latest/module/CheckCXXSourceRuns.html))
to compile, link and run a test executable.
This function is not available for Fortran!


Expand Down
6 changes: 4 additions & 2 deletions chapter-05/recipe-08/abstract.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
We show how to use `check_<language>_source_runs` to compile, link and run a
test executable.
We show how to use `check_<language>_source_runs`
(where `<lang>` can be [C](https://cmake.org/cmake/help/latest/module/CheckCSourceRuns.html) or
[CXX](https://cmake.org/cmake/help/latest/module/CheckCXXSourceRuns.html))
to compile, link and run a test executable.
This function is not available for Fortran!
4 changes: 3 additions & 1 deletion chapter-05/recipe-09/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Fine-tuning configuration and compilation with generator expressions

We show how to rewrite conditionals into generator expressions.
We show how to rewrite conditionals into [`generator expressions`].

[`generator expressions`]: https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html


- [cxx-example](cxx-example/)
Expand Down
4 changes: 3 additions & 1 deletion chapter-05/recipe-09/abstract.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
We show how to rewrite conditionals into generator expressions.
We show how to rewrite conditionals into [`generator expressions`].

[`generator expressions`]: https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
3 changes: 2 additions & 1 deletion chapter-07/recipe-01/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Code reuse with functions and macros

Abstract to be written ...
Code reuse with functions and macros


- [cxx-example](cxx-example/)

0 comments on commit e5e8261

Please sign in to comment.