mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-31 01:02:20 +00:00
doc: testers: document meta.cmakeConfigModules
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
@@ -41,9 +41,26 @@ If the `moduleNames` argument is omitted, `hasPkgConfigModules` will use `meta.p
|
||||
## `hasCmakeConfigModules` {#tester-hasCmakeConfigModules}
|
||||
|
||||
Checks whether a package exposes a given list of `*config.cmake` modules.
|
||||
If the `moduleNames` argument is omitted, `hasCmakeConfigModules` will use `meta.cmakeConfigModules`.
|
||||
Note the moduleNames used in cmake find_package are case sensitive.
|
||||
|
||||
:::{.example #ex-hascmakeconfigmodules}
|
||||
:::{.example #ex-hascmakeconfigmodules-defaultvalues}
|
||||
|
||||
# Check that `*config.cmake` modules are exposed using default values
|
||||
|
||||
```nix
|
||||
{
|
||||
passthru.tests.cmake-config = testers.hasCmakeConfigModules { package = finalAttrs.finalPackage; };
|
||||
|
||||
meta.cmakeConfigModules = [ "Foo" ];
|
||||
}
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
<!-- Old anchor name so links still work -->
|
||||
[]{#ex-hascmakeconfigmodules}
|
||||
:::{.example #ex-hascmakeconfigmodules-explicitmodules}
|
||||
|
||||
# Check that `*config.cmake` modules are exposed using explicit module names
|
||||
|
||||
|
||||
@@ -2252,6 +2252,12 @@
|
||||
"ex-hascmakeconfigmodules": [
|
||||
"index.html#ex-hascmakeconfigmodules"
|
||||
],
|
||||
"ex-hascmakeconfigmodules-defaultvalues": [
|
||||
"index.html#ex-hascmakeconfigmodules-defaultvalues"
|
||||
],
|
||||
"ex-hascmakeconfigmodules-explicitmodules": [
|
||||
"index.html#ex-hascmakeconfigmodules-explicitmodules"
|
||||
],
|
||||
"tester-lycheeLinkCheck": [
|
||||
"index.html#tester-lycheeLinkCheck"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user