diff --git a/01-basic/A-hello-cmake/README.adoc b/01-basic/A-hello-cmake/README.adoc index 2848abf3..9ed5ea96 100644 --- a/01-basic/A-hello-cmake/README.adoc +++ b/01-basic/A-hello-cmake/README.adoc @@ -17,8 +17,8 @@ A-hello-cmake$ tree ├── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * main.cpp - A simple "Hello World" cpp file. + * link:CMakeLists.txt[CMakeLists.txt] - Contains the CMake commands you wish to run + * link:main.cpp[main.cpp] - A simple "Hello World" cpp file. # Concepts @@ -233,7 +233,7 @@ All examples in this tutorial will use out-of-source builds. # Building the Examples -Below is sample output from building this example. +Below is sample output from building this example. [source,bash] ---- diff --git a/01-basic/B-hello-headers/README.adoc b/01-basic/B-hello-headers/README.adoc index da5c751f..b875aa47 100644 --- a/01-basic/B-hello-headers/README.adoc +++ b/01-basic/B-hello-headers/README.adoc @@ -23,10 +23,10 @@ B-hello-headers$ tree └── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run. - * inc/Hello.h - The header file to include. - * src/Hello.cpp - A source file to compile. - * src/main.cpp - The source file with main. + * link:CMakeLists.txt[CMakeLists.txt] - Contains the CMake commands you wish to run. + * link:inc/Hello.h[inc/Hello.h] - The header file to include. + * link:src/Hello.cpp[src/Hello.cpp] - A source file to compile. + * link:src/main.cpp[src/main.cpp] - The source file with main. # Concepts diff --git a/01-basic/C-static-library/README.adoc b/01-basic/C-static-library/README.adoc index 7e1737b6..fc418e4a 100644 --- a/01-basic/C-static-library/README.adoc +++ b/01-basic/C-static-library/README.adoc @@ -21,10 +21,10 @@ $ tree └── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * inc/Hello.h - The header file to include - * src/Hello.cpp - A source file to compile - * src/main.cpp - The source file with main + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:inc/Hello.h[] - The header file to include + * link:src/Hello.cpp[] - A source file to compile + * link:src/main.cpp[] - The source file with main # Concepts diff --git a/01-basic/D-shared-library/README.adoc b/01-basic/D-shared-library/README.adoc index 22380a32..d2382c2f 100644 --- a/01-basic/D-shared-library/README.adoc +++ b/01-basic/D-shared-library/README.adoc @@ -21,10 +21,10 @@ $ tree └── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * inc/Hello.h - The header file to include - * src/Hello.cpp - A source file to compile - * src/main.cpp - The source file with main + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:inc/Hello.h[] - The header file to include + * link:src/Hello.cpp[] - A source file to compile + * link:src/main.cpp[] - The source file with main # Concepts diff --git a/01-basic/E-installing/README.adoc b/01-basic/E-installing/README.adoc index 446aefa8..792c8c9a 100644 --- a/01-basic/E-installing/README.adoc +++ b/01-basic/E-installing/README.adoc @@ -24,11 +24,11 @@ $ tree └── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * cmake-examples.conf - An example configuration file - * inc/Hello.h - The header file to include - * src/Hello.cpp - A source file to compile - * src/main.cpp - The source file with main + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:cmake-examples.conf[] - An example configuration file + * link:inc/Hello.h[] - The header file to include + * link:src/Hello.cpp[] - A source file to compile + * link:src/main.cpp[] - The source file with main # Concepts diff --git a/01-basic/F-build-type/README.adoc b/01-basic/F-build-type/README.adoc index 8a1b3781..5635286e 100644 --- a/01-basic/F-build-type/README.adoc +++ b/01-basic/F-build-type/README.adoc @@ -26,8 +26,8 @@ $ tree ├── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * main.cpp - The source file with main + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:main.cpp[] - The source file with main # Concepts diff --git a/01-basic/G-compile-flags/README.adoc b/01-basic/G-compile-flags/README.adoc index bdb4c3e3..d194472f 100644 --- a/01-basic/G-compile-flags/README.adoc +++ b/01-basic/G-compile-flags/README.adoc @@ -18,8 +18,8 @@ $ tree ├── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * main.cpp - The source file with main + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:main.cpp[] - The source file with main # Concepts diff --git a/01-basic/H-third-party-library/README.adoc b/01-basic/H-third-party-library/README.adoc index 97b4b913..8eb82885 100644 --- a/01-basic/H-third-party-library/README.adoc +++ b/01-basic/H-third-party-library/README.adoc @@ -23,8 +23,8 @@ $ tree ├── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * main.cpp - The source file with main + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:main.cpp[] - The source file with main # Requirements diff --git a/01-basic/I-compiling-with-clang/README.adoc b/01-basic/I-compiling-with-clang/README.adoc index 16d4044a..d008f76c 100644 --- a/01-basic/I-compiling-with-clang/README.adoc +++ b/01-basic/I-compiling-with-clang/README.adoc @@ -13,14 +13,14 @@ method of changing the compiler from the default gcc to http://clang.llvm.org/[c The files in this tutorial are below: ``` -A-hello-cmake$ tree +$ tree . ├── CMakeLists.txt ├── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * main.cpp - A simple "Hello World" cpp file. + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:main.cpp[] - A simple "Hello World" cpp file. # Concepts diff --git a/01-basic/J-building-with-ninja/README.adoc b/01-basic/J-building-with-ninja/README.adoc index e5a7081c..039374ae 100644 --- a/01-basic/J-building-with-ninja/README.adoc +++ b/01-basic/J-building-with-ninja/README.adoc @@ -6,21 +6,21 @@ toc::[] # Introduction -As mentioned in the introduction, CMake is a meta-build system that can be used to +As mentioned, CMake is a meta-build system that can be used to create the build files for many other build tools. This example shows how to have CMake use the https://ninja-build.org/[ninja build] tool. The files in this tutorial are below: ``` -A-hello-cmake$ tree +$ tree . ├── CMakeLists.txt ├── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * main.cpp - A simple "Hello World" cpp file. + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:main.cpp[] - A simple "Hello World" cpp file. # Concepts diff --git a/02-sub-projects/A-basic/README.adoc b/02-sub-projects/A-basic/README.adoc index 442002d7..0d307123 100644 --- a/02-sub-projects/A-basic/README.adoc +++ b/02-sub-projects/A-basic/README.adoc @@ -17,6 +17,7 @@ create the following: The files included in this example are: ``` +$ tree . ├── CMakeLists.txt ├── subbinary @@ -34,14 +35,14 @@ The files included in this example are: └── sublib2.h ``` - * CMakeLists.txt - Top level CMakeLists.txt - * subbinary/CMakeLists.txt - to make the executable - * subbinary/main.cpp - source for the executable - * sublibrary1/CMakeLists.txt - to make a static library - * sublibrary1/inc/sublib1.h - * sublibrary1/src/sublib2.cpp - * sublibrary2/CMakeLists.txt - to setup header only library - * sublibrary2/inc/sublib2.h + * link:CMakeLists.txt[] - Top level CMakeLists.txt + * link:subbinary/CMakeLists.txt[] - to make the executable + * link:subbinary/main.cpp[] - source for the executable + * link:sublibrary1/CMakeLists.txt[] - to make a static library + * link:sublibrary1/inc/sublib1.h[] + * link:sublibrary1/src/sublib2.cpp[] + * link:sublibrary2/CMakeLists.txt[] - to setup header only library + * link:sublibrary2/inc/sublib2.h[] # Concepts diff --git a/03-code-generation/configure-files/README.adoc b/03-code-generation/configure-files/README.adoc index d1a7c7fe..6715c7d4 100644 --- a/03-code-generation/configure-files/README.adoc +++ b/03-code-generation/configure-files/README.adoc @@ -21,10 +21,10 @@ $ tree ├── ver.h.in ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * main.cpp - The source file with main - * path.h.in - File to contain a path to the build directory - * ver.h.in - File to contain the version of the project + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:main.cpp[] - The source file with main + * link:path.h.in[] - File to contain a path to the build directory + * link:ver.h.in[] - File to contain the version of the project # Concepts diff --git a/03-code-generation/protobuf/README.adoc b/03-code-generation/protobuf/README.adoc index ac824e4b..cc8a1b67 100644 --- a/03-code-generation/protobuf/README.adoc +++ b/03-code-generation/protobuf/README.adoc @@ -21,9 +21,9 @@ $ tree ├── main.cpp ``` - * AddressBook.proto - proto file from main protocol buffer https://developers.google.com/protocol-buffers/docs/cpptutorial[example] - * CMakeLists.txt - Contains the CMake commands you wish to run - * main.cpp - The source file from the protobuf example. + * link:AddressBook.proto[] - proto file from main protocol buffer https://developers.google.com/protocol-buffers/docs/cpptutorial[example] + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:main.cpp[] - The source file from the protobuf example. # Requirements diff --git a/04-static-analysis/cppcheck/README.adoc b/04-static-analysis/cppcheck/README.adoc index 48bd7769..3270fb72 100644 --- a/04-static-analysis/cppcheck/README.adoc +++ b/04-static-analysis/cppcheck/README.adoc @@ -19,7 +19,7 @@ analysis on all sub-projects. The files included in this example are: ``` -cppcheck$ tree +$ tree . ├── cmake │   ├── analysis.cmake @@ -34,13 +34,13 @@ cppcheck$ tree └── main2.cpp ``` - * CMakeLists.txt - Top level CMakeLists.txt - * cmake/analysis.cmake - Includes functions to add analysis targets - * cmake/modules/FindCppCheck.cmake - A custom package module to find CppCheck - * subproject1/CMakeLists.txt - CMake commands for subproject 1 - * subproject1/main.cpp - source for a subproject with no errors - * subproject2/CMakeLists.txt - CMake commands for subproject 2 - * subproject2/main2.cpp - source for a subproject that includes errors + * link:CMakeLists.txt[] - Top level CMakeLists.txt + * link:cmake/analysis.cmake[] - Includes functions to add analysis targets + * link:cmake/modules/FindCppCheck.cmake[] - A custom package module to find CppCheck + * link:subproject1/CMakeLists.txt[] - CMake commands for subproject 1 + * link:subproject1/main.cpp[] - source for a subproject with no errors + * link:subproject2/CMakeLists.txt[] - CMake commands for subproject 2 + * link:subproject2/main2.cpp[] - source for a subproject that includes errors # Requirements diff --git a/05-unit-testing/boost/README.adoc b/05-unit-testing/boost/README.adoc index 78702721..3f253ada 100644 --- a/05-unit-testing/boost/README.adoc +++ b/05-unit-testing/boost/README.adoc @@ -25,10 +25,10 @@ $ tree ├── unit_tests.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * Reverse.h / .cpp - Class to reverse a string - * Palindrome.h / .cpp - Class to test if a string is a palindrome - * unit_test.cpp - Unit Tests using boost unit test framework + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:Reverse.h[] / link:Reverse.cpp[.cpp] - Class to reverse a string + * link:Palindrome.h[] / link:Palindrome.cpp[.cpp] - Class to test if a string is a palindrome + * link:unit_test.cpp[] - Unit Tests using boost unit test framework # Requirements diff --git a/06-installer/deb/README.adoc b/06-installer/deb/README.adoc index b7f59534..3e9fdac0 100644 --- a/06-installer/deb/README.adoc +++ b/06-installer/deb/README.adoc @@ -23,11 +23,11 @@ $ tree └── main.cpp ``` - * CMakeLists.txt - Contains the CMake commands you wish to run - * cmake-examples.conf - An example configuration file - * inc/Hello.h - The header file to include - * src/Hello.cpp - A source file to compile - * src/main.cpp - The source file with main + * link:CMakeLists.txt[] - Contains the CMake commands you wish to run + * link:cmake-examples.conf[] - An example configuration file + * link:inc/Hello.h[] - The header file to include + * link:src/Hello.cpp[] - A source file to compile + * link:src/main.cpp[] - The source file with main # Concepts