mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-12-16 00:00:10 -05:00
Feature/add missing packageproject options (#524)
* 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>
This commit is contained in:
parent
369f1316f6
commit
3c25130ffa
@ -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
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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
|
||||
)
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
#
|
||||
|
||||
@ -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`.
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ class Project
|
||||
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
|
||||
|
||||
@ -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:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user