diff --git a/00_targets/README.md b/00_targets/README.md index d2a2992c9fbbed24ee449c0c1c3a30817fa12524..63ca5b5ef379ea2344615f6177ab8ad9a0b155bf 100644 --- a/00_targets/README.md +++ b/00_targets/README.md @@ -3,6 +3,12 @@ This recipe illustrates how to build a basic application. It consists of a backend library and an application frontend. +## What is a target? +Targets provide modularization and encapsulation. A target +encapsulates everything needed for a certain build job. It also +is some kind of container that allows efficient use as a building +block. + ## Define the target type [add_library](https://cmake.org/cmake/help/latest/command/add_library.html) [add_executable](https://cmake.org/cmake/help/latest/command/add_executable.html) @@ -20,11 +26,11 @@ It consists of a backend library and an application frontend. ## Usage requirements https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#transitive-usage-requirements -| keyword | result | -|---------------|------------------------------------------------------------| -| **PRIVATE** | only relevant for the target | -| **INTERFACE** | only relevant for targets depending on this target | -| **PUBLIC** | relevant for both, the target itself and dependent targets | +| keyword | result | +|---------------|--------------------------------------------------------------| +| **PRIVATE** | required to build the target, but not required when using it | +| **INTERFACE** | not required to build the target, but required when using it | +| **PUBLIC** | required for for building the target and for using it | ## How to link against a "supported" third-party library? Find the library with [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) and link against diff --git a/02_mkl/README.md b/02_mkl/README.md index d95aa73d570d8a79edf6e16528daeab8fcdecd75..7f41cd003b81940e59b6a2132cee66f32566c699 100644 --- a/02_mkl/README.md +++ b/02_mkl/README.md @@ -1,9 +1,9 @@ # Advantages of using targets -Targets provide modularization and encapsulation. A target -encapsulates everything needed for a certain build job. In the best -case the user of a target does not have to worry about anything, since -the developer of the target already put all information into it. +A developer providing the necessary files to use the library in CMake +is a very good example to show the strength of targets. In the best +case the end-user of the library does not have to worry about anything, +since the developer has put all necessary information into the target. For this example to work you need a recent oneAPI installation and -you need to set `MKL_ROOT`. \ No newline at end of file +you need to set `MKL_ROOT` to the MKL directory. \ No newline at end of file