Skip to content

Commit 41ab912

Browse files
committed
init
1 parent ff0ad84 commit 41ab912

File tree

12 files changed

+713
-0
lines changed

12 files changed

+713
-0
lines changed

.clang-format

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
AccessModifierOffset: -4
2+
AlignAfterOpenBracket: AlwaysBreak
3+
AlignConsecutiveAssignments: false
4+
AlignConsecutiveDeclarations: false
5+
AlignEscapedNewlines: DontAlign
6+
AlignOperands: true
7+
AllowAllParametersOfDeclarationOnNextLine: false
8+
AllowShortBlocksOnASingleLine: false
9+
AllowShortCaseLabelsOnASingleLine: false
10+
AllowShortFunctionsOnASingleLine: Inline
11+
AllowShortIfStatementsOnASingleLine: false
12+
AllowShortLoopsOnASingleLine: false
13+
AlwaysBreakAfterReturnType: TopLevel
14+
AlwaysBreakBeforeMultilineStrings: false
15+
AlwaysBreakTemplateDeclarations: true
16+
BinPackArguments: false
17+
BinPackParameters: false
18+
BraceWrapping:
19+
AfterClass: true
20+
AfterControlStatement: true
21+
AfterEnum: true
22+
AfterFunction: true
23+
AfterNamespace: false
24+
AfterStruct: true
25+
AfterUnion: true
26+
AfterExternBlock: false
27+
BeforeCatch: true
28+
BeforeElse: true
29+
BreakBeforeBraces: Custom
30+
BreakBeforeBinaryOperators: None
31+
BreakBeforeTernaryOperators: true
32+
BreakConstructorInitializers: AfterColon
33+
BreakStringLiterals: false
34+
ColumnLimit: 120
35+
CommentPragmas: '^begin_wpp|^end_wpp|^FUNC |^USESUFFIX |^USESUFFIX '
36+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
37+
ConstructorInitializerIndentWidth: 4
38+
ContinuationIndentWidth: 4
39+
Cpp11BracedListStyle: true
40+
DerivePointerAlignment: false
41+
ExperimentalAutoDetectBinPacking: false
42+
IndentCaseLabels: false
43+
IndentPPDirectives: AfterHash
44+
IndentWidth: 4
45+
KeepEmptyLinesAtTheStartOfBlocks: false
46+
Language: Cpp
47+
MacroBlockBegin: '^BEGIN_MODULE$|^BEGIN_TEST_CLASS$|^BEGIN_TEST_METHOD$'
48+
MacroBlockEnd: '^END_MODULE$|^END_TEST_CLASS$|^END_TEST_METHOD$'
49+
MaxEmptyLinesToKeep: 1
50+
NamespaceIndentation: None
51+
PointerAlignment: Right
52+
ReflowComments: true
53+
SortIncludes: false
54+
SpaceAfterCStyleCast: false
55+
SpaceBeforeAssignmentOperators: true
56+
SpaceBeforeCtorInitializerColon: true
57+
SpaceBeforeCtorInitializerColon: true
58+
SpaceBeforeParens: ControlStatements
59+
SpaceBeforeRangeBasedForLoopColon: true
60+
SpaceInEmptyParentheses: false
61+
SpacesInAngles: false
62+
SpacesInCStyleCastParentheses: false
63+
SpacesInParentheses: false
64+
SpacesInSquareBrackets: false
65+
Standard: Cpp11
66+
StatementMacros: [
67+
'EXTERN_C',
68+
'PAGED',
69+
'PAGEDX',
70+
'NONPAGED',
71+
'PNPCODE',
72+
'INITCODE',
73+
'_At_',
74+
'_When_',
75+
'_Success_',
76+
'_Check_return_',
77+
'_Must_inspect_result_',
78+
'_IRQL_requires_',
79+
'_IRQL_requires_max_',
80+
'_IRQL_requires_min_',
81+
'_IRQL_saves_',
82+
'_IRQL_restores_',
83+
'_IRQL_saves_global_',
84+
'_IRQL_restores_global_',
85+
'_IRQL_raises_',
86+
'_IRQL_lowers_',
87+
'_Acquires_lock_',
88+
'_Releases_lock_',
89+
'_Acquires_exclusive_lock_',
90+
'_Releases_exclusive_lock_',
91+
'_Acquires_shared_lock_',
92+
'_Releases_shared_lock_',
93+
'_Requires_lock_held_',
94+
'_Use_decl_annotations_',
95+
'_Guarded_by_',
96+
'__drv_preferredFunction',
97+
'__drv_allocatesMem',
98+
'__drv_freesMem',
99+
]
100+
TabWidth: '4'
101+
UseTab: Never

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# cmkr
2+
/**/CMakeLists.txt linguist-generated
3+
/**/cmkr.cmake linguist-vendored
4+
/cmake/FindWDK.cmake linguist-vendored

CMakeLists.txt

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmake.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
3+
4+
[conditions]
5+
test_mode = "ENABLE_TEST"
6+
7+
[project]
8+
name = "libwindrv"
9+
include-before = ["cmake/msvc-configurations.cmake"]
10+
msvc-runtime = "static"
11+
12+
[variables]
13+
CMAKE_MODULE_PATH = "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
14+
15+
[find-package.WDK]
16+
17+
[template.driver]
18+
type = "executable"
19+
add-function = "wdk_add_driver"
20+
compile-features = ["cxx_std_20"]
21+
22+
[template.driver_lib]
23+
type = "static"
24+
add-function = "wdk_add_library"
25+
compile-features = ["cxx_std_20"]
26+
27+
[target.libwindrv]
28+
type = "driver_lib"
29+
sources = ["src/*.cpp", "src/*.hpp", "src/*.h"]
30+
31+
[target.testdrv1]
32+
condition = "test_mode"
33+
type = "driver"
34+
sources = ["test/testdrv1/*.cpp", "test/testdrv1/*.hpp", "test/testdrv1/*.h"]
35+
link-libraries = ["libwindrv"]

0 commit comments

Comments
 (0)