Skip to content

Commit

Permalink
Feature/add missing packageproject options (#524)
Browse files Browse the repository at this point in the history
* Add missing packageproject options

* Fix typos with codespell

* Update test/style/CMakeLists.txt

Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com>

* fix-cmake-format

---------

Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com>
  • Loading branch information
ClausKlein and TheLartians authored Jan 17, 2024
1 parent 369f131 commit 3c25130
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
5 changes: 5 additions & 0 deletions cmake/.cmake-format-additional_commands-cpm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmake/testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions examples/entt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
2 changes: 1 addition & 1 deletion examples/linenoise/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/spdlog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
4 changes: 2 additions & 2 deletions test/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<repo-root>/test/integration`, you can run simply `$ ruby runner.rb`.

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/integration/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/integration/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 3c25130

Please sign in to comment.