-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CPM linting changes and stub for CPM
- Loading branch information
Showing
4 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/BlankSpruce/gersemi/master/gersemi/configuration.schema.json | ||
|
||
definitions: [cmake] | ||
definitions: [cmake, cmake/stubs] | ||
indent: 4 | ||
line_length: 80 | ||
list_expansion: favour-expansion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This directory contains stubs of functions that we call directly, but whose definition we cannot easily | ||
point the formatter (Gersemi) to. See https://github.com/BlankSpruce/gersemi?tab=readme-ov-file#lets-make-a-deal for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
function(CPMAddPackage) | ||
list(LENGTH ARGN argnLength) | ||
if(argnLength EQUAL 1) | ||
cpm_parse_add_package_single_arg("${ARGN}" ARGN) | ||
|
||
# The shorthand syntax implies EXCLUDE_FROM_ALL and SYSTEM | ||
set(ARGN "${ARGN};EXCLUDE_FROM_ALL;YES;SYSTEM;YES;") | ||
endif() | ||
|
||
set(oneValueArgs | ||
NAME | ||
FORCE | ||
VERSION | ||
GIT_TAG | ||
DOWNLOAD_ONLY | ||
GITHUB_REPOSITORY | ||
GITLAB_REPOSITORY | ||
BITBUCKET_REPOSITORY | ||
GIT_REPOSITORY | ||
SOURCE_DIR | ||
FIND_PACKAGE_ARGUMENTS | ||
NO_CACHE | ||
SYSTEM | ||
GIT_SHALLOW | ||
EXCLUDE_FROM_ALL | ||
SOURCE_SUBDIR | ||
CUSTOM_CACHE_KEY | ||
) | ||
|
||
set(multiValueArgs | ||
URL | ||
OPTIONS | ||
DOWNLOAD_COMMAND | ||
PATCHES | ||
) | ||
|
||
cmake_parse_arguments( | ||
CPM_ARGS | ||
"" | ||
"${oneValueArgs}" | ||
"${multiValueArgs}" | ||
"${ARGN}" | ||
) | ||
endfunction() |