From f1f7c85d95e0b2aaf428f8383872fe1db3e17036 Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Fri, 17 Jan 2020 19:48:14 -0500 Subject: [PATCH] spelling fixes --- 01-basic/C-static-library/README.adoc | 6 +++--- 01-basic/G-compile-flags/README.adoc | 4 ++-- 01-basic/H-third-party-library/README.adoc | 2 +- 01-basic/I-compiling-with-clang/run_test.sh | 2 +- 01-basic/L-cpp-standard/i-common-method/README.adoc | 2 +- 01-basic/L-cpp-standard/iii-compile-features/CMakeLists.txt | 2 +- 01-basic/README.adoc | 2 +- 02-sub-projects/A-basic/README.adoc | 4 ++-- 03-code-generation/README.adoc | 2 +- 04-static-analysis/clang-analyzer/README.adoc | 2 +- .../clang-format/cmake/modules/clang-format.cmake | 2 +- .../cmake/scripts/clang-format-check-changed.py | 2 +- 04-static-analysis/cppcheck-compile-commands/README.adoc | 2 +- .../cmake/modules/FindCppCheck.cmake | 2 +- 04-static-analysis/cppcheck/cmake/analysis.cmake | 2 +- .../cppcheck/cmake/modules/FindCppCheck.cmake | 6 +++--- .../catch2-vendored/3rd_party/catch2/catch2/catch.hpp | 6 +++--- 07-package-management/D-conan/i-basic/README.adoc | 4 ++-- 07-package-management/README.adoc | 2 +- dockerfiles/README.adoc | 2 +- 20 files changed, 29 insertions(+), 29 deletions(-) diff --git a/01-basic/C-static-library/README.adoc b/01-basic/C-static-library/README.adoc index e35b0b7..a1ea526 100644 --- a/01-basic/C-static-library/README.adoc +++ b/01-basic/C-static-library/README.adoc @@ -49,7 +49,7 @@ the sources in the +add_library+ call. [NOTE] ==== -As mentioned in the prevoius example, we pass the source files directly to the +As mentioned in the previous example, we pass the source files directly to the +add_library+ call, as recommended for modern CMake. ==== @@ -73,7 +73,7 @@ This will cause the included directory used in the following places: The meaning of scopes are: * +PRIVATE+ - the directory is added to this target's include directories -* +INTERFACE+ - the directory is added to the include directores for any targets that link this library. +* +INTERFACE+ - the directory is added to the include directories for any targets that link this library. * +PUBLIC+ - As above, it is included int his library and also any targets that link this library. @@ -113,7 +113,7 @@ target_link_libraries( hello_binary ---- This tells CMake to link the hello_library against the hello_binary executable -during link time. It will also propogate any include directries with +PUBLIC+ or +INTERFACE+ scope +during link time. It will also propagate any include directories with +PUBLIC+ or +INTERFACE+ scope from the linked library target. An example of this being called by the compiler is diff --git a/01-basic/G-compile-flags/README.adoc b/01-basic/G-compile-flags/README.adoc index 810d171..fed5cf8 100644 --- a/01-basic/G-compile-flags/README.adoc +++ b/01-basic/G-compile-flags/README.adoc @@ -39,7 +39,7 @@ target_compile_definitions(cmake_examples_compile_flags This will cause the compiler to add the definition +-DEX3+ when compiling the target. -In the target was a library, and the scope +PUBLIC+ or +INTERFACE+ has been choosen the definition would also be included in any executables that link this target. +In the target was a library, and the scope +PUBLIC+ or +INTERFACE+ has been chosen the definition would also be included in any executables that link this target. For compiler options you can also use the +target_compile_options()+ link:https://cmake.org/cmake/help/v3.0/command/target_compile_options.html[function]. @@ -70,7 +70,7 @@ For more details, see https://cmake.org/cmake/help/v3.0/command/set.html[here] ==== -Once set the +CMAKE_C_FLAGS+ and +CMAKE_CXX_FLAGS+ will set a compler flag / definiton globally for all targets in this directory or any included sub-directories. This method is not recommended for general usage now and the +target_compile_definitions+ function is preferred. +Once set the +CMAKE_C_FLAGS+ and +CMAKE_CXX_FLAGS+ will set a compler flag / definition globally for all targets in this directory or any included sub-directories. This method is not recommended for general usage now and the +target_compile_definitions+ function is preferred. ### Set CMake Flags diff --git a/01-basic/H-third-party-library/README.adoc b/01-basic/H-third-party-library/README.adoc index 3442a4b..2fdb5d7 100644 --- a/01-basic/H-third-party-library/README.adoc +++ b/01-basic/H-third-party-library/README.adoc @@ -95,7 +95,7 @@ Most modern CMake libraries link:https://cmake.org/cmake/help/v3.6/prop_tgt/IMPO The benefit of imported targets are that they can also populate include directories and linked libraries. For example, starting from v3.5+ of CMake, the -Boost module supports this. Similar to using your own ALIAS target for libraires, an +ALIAS+ in a module can make referencing found targets eaiser. +Boost module supports this. Similar to using your own ALIAS target for libraires, an +ALIAS+ in a module can make referencing found targets easier. In the case of Boost, all targets are exported using the `Boost::` identifier and then the name of the subsystem. For example you can use: diff --git a/01-basic/I-compiling-with-clang/run_test.sh b/01-basic/I-compiling-with-clang/run_test.sh index ff6dae5..b1ec516 100755 --- a/01-basic/I-compiling-with-clang/run_test.sh +++ b/01-basic/I-compiling-with-clang/run_test.sh @@ -1,6 +1,6 @@ #!/bin/bash # Ubuntu supports multiple versions of clang to be installed at the same time. -# The tests need to determin the clang binary before calling cmake +# The tests need to determine the clang binary before calling cmake clang_bin=`which clang` clang_xx_bin=`which clang++` diff --git a/01-basic/L-cpp-standard/i-common-method/README.adoc b/01-basic/L-cpp-standard/i-common-method/README.adoc index 5735156..ac0c5d2 100644 --- a/01-basic/L-cpp-standard/i-common-method/README.adoc +++ b/01-basic/L-cpp-standard/i-common-method/README.adoc @@ -6,7 +6,7 @@ toc::[] # Introduction -This example shows a common method to set the C++ Standard. This can be used with most versions of CMake. However, if you are targetting a recent version of CMake there are more convenient methods available. +This example shows a common method to set the C++ Standard. This can be used with most versions of CMake. However, if you are targeting a recent version of CMake there are more convenient methods available. The files in this tutorial are below: diff --git a/01-basic/L-cpp-standard/iii-compile-features/CMakeLists.txt b/01-basic/L-cpp-standard/iii-compile-features/CMakeLists.txt index 23d62ed..f331a44 100644 --- a/01-basic/L-cpp-standard/iii-compile-features/CMakeLists.txt +++ b/01-basic/L-cpp-standard/iii-compile-features/CMakeLists.txt @@ -9,7 +9,7 @@ project (hello_cpp11) # Add an executable add_executable(hello_cpp11 main.cpp) -# set the C++ standard to the approriate standard for using auto +# set the C++ standard to the appropriate standard for using auto target_compile_features(hello_cpp11 PUBLIC cxx_auto_type) # Print the list of known compile features for this version of CMake diff --git a/01-basic/README.adoc b/01-basic/README.adoc index b60a7f4..87fc185 100644 --- a/01-basic/README.adoc +++ b/01-basic/README.adoc @@ -6,7 +6,7 @@ set compile flags, create and link executables and libraries, and install them. The examples included are - link:A-hello-cmake[hello-cmake]. A hello world example. - - link:B-hello-headers[hello-headers]. A slightly more complicated hello world example, using seperate source and include folders. + - link:B-hello-headers[hello-headers]. A slightly more complicated hello world example, using separate source and include folders. - link:C-static-library[static-library]. An example using a static library. - link:D-shared-library[shared-library]. An example using a shared library. - link:E-installing[installing]. Shows how to create a 'make install' target that will install binaries and libraries. diff --git a/02-sub-projects/A-basic/README.adoc b/02-sub-projects/A-basic/README.adoc index c13cf9a..b77a94f 100644 --- a/02-sub-projects/A-basic/README.adoc +++ b/02-sub-projects/A-basic/README.adoc @@ -124,7 +124,7 @@ add_library(${PROJECT_NAME} INTERFACE) When creating the target you can also include directories for that target using the +INTERFACE+ scope. The +INTERFACE+ scope is use to make target requirements that are used in any Libraries -that link this target but not in the complation of the target itself. +that link this target but not in the compilation of the target itself. [source,cmake] ---- @@ -171,7 +171,7 @@ target_link_libraries(subbinary ## Include directories from sub-projects When adding the libraries from the sub-projects, starting from cmake v3, there is -no need to add the projects include directores in the include directories of the +no need to add the projects include directories in the include directories of the binary using them. This is controlled by the scope in the `target_include_directories()` command when creating diff --git a/03-code-generation/README.adoc b/03-code-generation/README.adoc index 92f495b..fe6201b 100644 --- a/03-code-generation/README.adoc +++ b/03-code-generation/README.adoc @@ -1,6 +1,6 @@ = Code Generation -Code generation can be useful to create source code in different languages from a common description file. This can reduce the amount of manual code to write and increase inter-operability. +Code generation can be useful to create source code in different languages from a common description file. This can reduce the amount of manual code to write and increase interoperability. Examples showing code generation using variables from CMake and also using some common tools. diff --git a/04-static-analysis/clang-analyzer/README.adoc b/04-static-analysis/clang-analyzer/README.adoc index 8059696..df958c0 100644 --- a/04-static-analysis/clang-analyzer/README.adoc +++ b/04-static-analysis/clang-analyzer/README.adoc @@ -84,7 +84,7 @@ $ tree 1 directory, 4 files ---- -By defaut these are output to +/tmp/scanbuildout/{run folder}+. You can change this using `scan-build -o /output/folder`. +By default these are output to +/tmp/scanbuildout/{run folder}+. You can change this using `scan-build -o /output/folder`. # Building the example diff --git a/04-static-analysis/clang-format/cmake/modules/clang-format.cmake b/04-static-analysis/clang-format/cmake/modules/clang-format.cmake index 5e631b2..39b07ea 100644 --- a/04-static-analysis/clang-format/cmake/modules/clang-format.cmake +++ b/04-static-analysis/clang-format/cmake/modules/clang-format.cmake @@ -50,7 +50,7 @@ foreach(EXCLUDE_PATTERN ${CLANG_FORMAT_EXCLUDE_PATTERNS}) list(APPEND EXCLUDE_PATTERN_ARGS "--exclude=${EXCLUDE_PATTERN}") endforeach() -# call the script to chech changed files in git +# call the script to check changed files in git add_custom_target(format-check-changed COMMENT "Checking changed files in git" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} diff --git a/04-static-analysis/clang-format/cmake/scripts/clang-format-check-changed.py b/04-static-analysis/clang-format/cmake/scripts/clang-format-check-changed.py index 6c91c2a..3fcbb0c 100755 --- a/04-static-analysis/clang-format/cmake/scripts/clang-format-check-changed.py +++ b/04-static-analysis/clang-format/cmake/scripts/clang-format-check-changed.py @@ -142,7 +142,7 @@ def cli(): description='Checks if files chagned in git match the .clang-format specification') parser.add_argument("--file-extensions", type=str, default=".cpp,.h,.cxx,.hxx,.hpp,.cc,.ipp", - help="Comma seperated list of file extensions to check") + help="Comma separated list of file extensions to check") parser.add_argument('--exclude', action='append', default=[], help='Will not match the files / directories with these in the name') parser.add_argument('--clang-format-bin', type=str, default="clang-format", diff --git a/04-static-analysis/cppcheck-compile-commands/README.adoc b/04-static-analysis/cppcheck-compile-commands/README.adoc index cf22834..ea2cdb2 100644 --- a/04-static-analysis/cppcheck-compile-commands/README.adoc +++ b/04-static-analysis/cppcheck-compile-commands/README.adoc @@ -61,7 +61,7 @@ $ wget https://github.com/danmar/cppcheck/archive/1.79.tar.gz \ ## Adding Custom Package Modules -As with the previous example I use a custom module to find CppCheck. This version is slightly different to the pervious one and +As with the previous example I use a custom module to find CppCheck. This version is slightly different to the previous one and will automatically add a `make cppcheck-analysis` target. [source,cmake] diff --git a/04-static-analysis/cppcheck-compile-commands/cmake/modules/FindCppCheck.cmake b/04-static-analysis/cppcheck-compile-commands/cmake/modules/FindCppCheck.cmake index cecb870..7d811ef 100644 --- a/04-static-analysis/cppcheck-compile-commands/cmake/modules/FindCppCheck.cmake +++ b/04-static-analysis/cppcheck-compile-commands/cmake/modules/FindCppCheck.cmake @@ -41,7 +41,7 @@ if(CPPCHECK_BIN) set(CPPCHECK_THREADS_ARG "-j4" CACHE STRING "The number of threads to use") set(CPPCHECK_PROJECT_ARG "--project=${PROJECT_BINARY_DIR}/compile_commands.json") set(CPPCHECK_BUILD_DIR_ARG "--cppcheck-build-dir=${PROJECT_BINARY_DIR}/analysis/cppcheck" CACHE STRING "The build directory to use") - # Don't show thise errors + # Don't show these errors if(EXISTS "${CMAKE_SOURCE_DIR}/.cppcheck_suppressions") set(CPPCHECK_SUPPRESSIONS "--suppressions-list=${CMAKE_SOURCE_DIR}/.cppcheck_suppressions" CACHE STRING "The suppressions file to use") else() diff --git a/04-static-analysis/cppcheck/cmake/analysis.cmake b/04-static-analysis/cppcheck/cmake/analysis.cmake index b2c71b0..5c3028d 100644 --- a/04-static-analysis/cppcheck/cmake/analysis.cmake +++ b/04-static-analysis/cppcheck/cmake/analysis.cmake @@ -23,7 +23,7 @@ macro(add_analysis _target _sources) set(ALL_ANALYSIS_TARGETS "${ALL_ANALYSIS_TARGETS}" PARENT_SCOPE) # This is used to make the command run correctly on the command line. - # The COMMAND argumetn expects a list and this does the change + # The COMMAND argument expects a list and this does the change # I need to check which version works with 2.7 if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VESION} GREATER 2.7) separate_arguments(tmp_args UNIX_COMMAND ${CPPCHECK_ARG}) diff --git a/04-static-analysis/cppcheck/cmake/modules/FindCppCheck.cmake b/04-static-analysis/cppcheck/cmake/modules/FindCppCheck.cmake index 77b02c9..095797e 100644 --- a/04-static-analysis/cppcheck/cmake/modules/FindCppCheck.cmake +++ b/04-static-analysis/cppcheck/cmake/modules/FindCppCheck.cmake @@ -12,11 +12,11 @@ find_program(CPPCHECK_BIN NAMES cppcheck) # -# Arugments are +# Arguments are # -j use multiple threads (and thread count) # --quite only show errors / warnings etc # --error-exitcode The code to exit with if an error shows up -# --enabled Comman seperated list of the check types. Can include warning,performance,style +# --enabled Comma separated list of the check types. Can include warning,performance,style # Note nightly build on earth changes error-exitcode to 0 set (CPPCHECK_THREADS "-j 4" CACHE STRING "The -j argument to have cppcheck use multiple threads / cores") @@ -34,4 +34,4 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS( mark_as_advanced( CPPCHECK_BIN CPPCHECK_THREADS - CPPCHECK_ARG) \ No newline at end of file + CPPCHECK_ARG) diff --git a/05-unit-testing/catch2-vendored/3rd_party/catch2/catch2/catch.hpp b/05-unit-testing/catch2-vendored/3rd_party/catch2/catch2/catch.hpp index b1b2411..274eaba 100644 --- a/05-unit-testing/catch2-vendored/3rd_party/catch2/catch2/catch.hpp +++ b/05-unit-testing/catch2-vendored/3rd_party/catch2/catch2/catch.hpp @@ -1666,7 +1666,7 @@ namespace Catch { m_result( result ) {} - // We don't actually need a virtual destructor, but many static analysers + // We don't actually need a virtual destructor, but many static analyzers // complain if it's not here :-( virtual ~ITransientExpression(); @@ -2844,7 +2844,7 @@ public: // The following functions create the actual matcher objects. // The user has to explicitly specify type to the function, because - // infering std::function is hard (but possible) and + // inferring std::function is hard (but possible) and // requires a lot of TMP. template Generic::PredicateMatcher Predicate(std::function const& predicate, std::string const& description = "") { @@ -9248,7 +9248,7 @@ namespace Catch { if (strerror_s(buffer, errno)) { CATCH_RUNTIME_ERROR("Could not translate errno to a string"); } - CATCH_RUNTIME_ERROR("Coul dnot open the temp file: '" << m_buffer << "' because: " << buffer); + CATCH_RUNTIME_ERROR("Could not open the temp file: '" << m_buffer << "' because: " << buffer); } } #else diff --git a/07-package-management/D-conan/i-basic/README.adoc b/07-package-management/D-conan/i-basic/README.adoc index 6609df6..d7e6add 100644 --- a/07-package-management/D-conan/i-basic/README.adoc +++ b/07-package-management/D-conan/i-basic/README.adoc @@ -67,7 +67,7 @@ $ cd build $ conan install .. ---- -This will tell conan to read the +conanfile.txt+ from your root folder and install any required package configurations. If the package is not availabe in your package cache it will be downloaded. +This will tell conan to read the +conanfile.txt+ from your root folder and install any required package configurations. If the package is not available in your package cache it will be downloaded. As per our requires section, `conan install` will download a static library version of fmtlib along with all required headers. On my system with default configuration, this cached library is as follows: @@ -210,4 +210,4 @@ make[1]: Leaving directory '/home/devuser/ws/build' $ ./bin/third_party_include Hello, conan. This is fmtlib! ----- \ No newline at end of file +---- diff --git a/07-package-management/README.adoc b/07-package-management/README.adoc index 675ca2b..6907be9 100644 --- a/07-package-management/README.adoc +++ b/07-package-management/README.adoc @@ -8,5 +8,5 @@ toc::[] Introduction ------------ -For C++ and CMake there is currently no universally accepted way of managing and packaging dependencies. However, in recent years there have been some new and interesting package management systems made available. While these are seperate systems to CMake, most of them have are designed to integrate directly into a CMake based build system. +For C++ and CMake there is currently no universally accepted way of managing and packaging dependencies. However, in recent years there have been some new and interesting package management systems made available. While these are separate systems to CMake, most of them have are designed to integrate directly into a CMake based build system. diff --git a/dockerfiles/README.adoc b/dockerfiles/README.adoc index aa3e57b..7202b76 100644 --- a/dockerfiles/README.adoc +++ b/dockerfiles/README.adoc @@ -29,7 +29,7 @@ In this example the tag is created as follows /: -This will tag the container as belong to my repositry with the label of the container being the version of cmake installed. +This will tag the container as belong to my repository with the label of the container being the version of cmake installed. ## Pre-build Images