From 3c25130ffa790ab54bc417bccda9078907827de8 Mon Sep 17 00:00:00 2001 From: Claus Klein Date: Wed, 17 Jan 2024 09:06:16 +0100 Subject: [PATCH] Feature/add missing packageproject options (#524) * Add missing packageproject options * Fix typos with codespell * Update test/style/CMakeLists.txt Co-authored-by: Lars Melchior * fix-cmake-format --------- Co-authored-by: Lars Melchior --- cmake/.cmake-format-additional_commands-cpm | 5 +++++ cmake/testing.cmake | 4 ++-- examples/entt/CMakeLists.txt | 3 +-- examples/linenoise/main.cpp | 2 +- examples/spdlog/CMakeLists.txt | 2 +- test/integration/README.md | 4 ++-- test/integration/lib.rb | 2 +- test/integration/tutorial.md | 2 +- 8 files changed, 14 insertions(+), 10 deletions(-) diff --git a/cmake/.cmake-format-additional_commands-cpm b/cmake/.cmake-format-additional_commands-cpm index 284c984c..5dd80256 100644 --- a/cmake/.cmake-format-additional_commands-cpm +++ b/cmake/.cmake-format-additional_commands-cpm @@ -52,11 +52,16 @@ parse: kwargs: NAME: 1 VERSION: 1 + NAMESPACE: 1 INCLUDE_DIR: 1 INCLUDE_DESTINATION: 1 + INCLUDE_HEADER_PATTERN: 1 BINARY_DIR: 1 COMPATIBILITY: 1 VERSION_HEADER: 1 + EXPORT_HEADER: 1 + DISABLE_VERSION_SUFFIX: 1 + CPACK: 1 DEPENDENCIES: + cpmusepackagelock: pargs: 1 diff --git a/cmake/testing.cmake b/cmake/testing.cmake index 5a67ed4f..bbc1bf27 100644 --- a/cmake/testing.cmake +++ b/cmake/testing.cmake @@ -32,13 +32,13 @@ function(ASSERT_DEFINED KEY) if(DEFINED ${KEY}) message(STATUS "test passed: '${KEY}' is defined") else() - message(FATAL_ERROR "assertion failed: '${KEY}' is not defiend") + message(FATAL_ERROR "assertion failed: '${KEY}' is not defined") endif() endfunction() function(ASSERT_NOT_DEFINED KEY) if(DEFINED ${KEY}) - message(FATAL_ERROR "assertion failed: '${KEY}' is defiend (${${KEY}})") + message(FATAL_ERROR "assertion failed: '${KEY}' is defined (${${KEY}})") else() message(STATUS "test passed: '${KEY}' is not defined") endif() diff --git a/examples/entt/CMakeLists.txt b/examples/entt/CMakeLists.txt index ecf1bc98..eec1dd19 100644 --- a/examples/entt/CMakeLists.txt +++ b/examples/entt/CMakeLists.txt @@ -9,8 +9,7 @@ include(../../cmake/CPM.cmake) CPMAddPackage( NAME EnTT VERSION 3.1.1 - GITHUB_REPOSITORY skypjack/entt - # EnTT's CMakeLists screws with configuration options + GITHUB_REPOSITORY skypjack/entt # EnTT's CMakeLists screws with configuration options DOWNLOAD_ONLY True ) diff --git a/examples/linenoise/main.cpp b/examples/linenoise/main.cpp index d70b288f..8db8731c 100644 --- a/examples/linenoise/main.cpp +++ b/examples/linenoise/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char **argv) { int len = atoi(line + 11); linenoiseHistorySetMaxLen(len); } else if (line[0] == '/') { - printf("Unreconized command: %s\n", line); + printf("Unrecognized command: %s\n", line); } free(line); } diff --git a/examples/spdlog/CMakeLists.txt b/examples/spdlog/CMakeLists.txt index 580ccecb..3777b34d 100644 --- a/examples/spdlog/CMakeLists.txt +++ b/examples/spdlog/CMakeLists.txt @@ -9,7 +9,7 @@ include(../../cmake/CPM.cmake) CPMAddPackage("gh:gabime/spdlog@1.8.2") # spdlog uses fmt and bundles that dependency. If you want to use fmt in your project as well, you -# can let spdlog re-use fmt from CPM.cmake like this: +# can let spdlog reuse fmt from CPM.cmake like this: # # cmake-format: off # diff --git a/test/integration/README.md b/test/integration/README.md index 59a68a6d..c5142496 100644 --- a/test/integration/README.md +++ b/test/integration/README.md @@ -12,7 +12,7 @@ To run all tests from the repo root execute: $ ruby test/integration/runner.rb ``` -The runner will run all tests and generate a report of the exeuction. +The runner will run all tests and generate a report of the execution. The current working directory doesn't matter. If you are in `/test/integration`, you can run simply `$ ruby runner.rb`. @@ -34,7 +34,7 @@ Writing tests makes use of the custom integration test framework in `lib.rb`. It * There should be no dependency between the test scripts. Each should be executable individually and the order in which multiple ones are executed mustn't matter. * The class should contain methods, also prefixed with `test_` which will be executed by the framework. In most cases there would be a single test method per class. * In case there are multiple test methods, they will be executed in the order in which they are defined. -* The test methods should contain assertions which check for the expected state of things at varous points of the test's execution. +* The test methods should contain assertions which check for the expected state of things at various points of the test's execution. ### More diff --git a/test/integration/lib.rb b/test/integration/lib.rb index 377f0f92..bf39e094 100644 --- a/test/integration/lib.rb +++ b/test/integration/lib.rb @@ -143,7 +143,7 @@ def read_cache end class IntegrationTest < Test::Unit::TestCase - self.test_order = :defined # run tests in order of defintion (as opposed to alphabetical) + self.test_order = :defined # run tests in order of definition (as opposed to alphabetical) def cleanup # Clear cpm-related env vars which may have been set by the test diff --git a/test/integration/tutorial.md b/test/integration/tutorial.md index 17eea960..c2dc4ae4 100644 --- a/test/integration/tutorial.md +++ b/test/integration/tutorial.md @@ -14,7 +14,7 @@ class MyTest < IntegrationTest end ``` -Now we have our test case class, and the single test method that we will require. Let's focus on the method's contents. The integration test framework provides us with a helper class, `Project`, which can be used for this scenario. A project has an assoiciated pair of source and binary directories in the temporary directory and it provides methods to work with them. +Now we have our test case class, and the single test method that we will require. Let's focus on the method's contents. The integration test framework provides us with a helper class, `Project`, which can be used for this scenario. A project has an associated pair of source and binary directories in the temporary directory and it provides methods to work with them. We start by creating the project: