Skip to content

Commit 673c45f

Browse files
authored
Define cmake presets for krnlmon (#164)
- Created a `CMakePresets.json` file for krnlmon. - Added `CMakeUserPresets.json` to the `.gitignore` file. Supports standalone cmake builds, for use during development. Signed-off-by: Derek Foster <[email protected]>
1 parent c6c3925 commit 673c45f

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MODULE.bazel.lock
77
# CMake
88
/build/
99
/install/
10+
CMakeUserPresets.json
1011

1112
# VS Code
1213
/.vscode/

CMakePresets.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"version": 4,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 23,
6+
"patch": 0
7+
},
8+
"configurePresets": [
9+
{
10+
"name": "common-target",
11+
"description": "Common presets for all targets",
12+
"hidden": true,
13+
"generator": "Unix Makefiles",
14+
"binaryDir": "${sourceDir}/build",
15+
"cacheVariables": {
16+
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
17+
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
18+
"CMAKE_INSTALL_PREFIX": {
19+
"type": "PATH",
20+
"value": "${sourceDir}/install"
21+
},
22+
"SET_RPATH": true
23+
}
24+
},
25+
{
26+
"name": "base-dpdk-target",
27+
"description": "Base presets for DPDK target",
28+
"hidden": true,
29+
"inherits": ["common-target"],
30+
"cacheVariables": {
31+
"TDI_TARGET": "dpdk"
32+
}
33+
},
34+
{
35+
"name": "base-es2k-target",
36+
"description": "Base presets for ES2K target",
37+
"hidden": true,
38+
"inherits": ["common-target"],
39+
"cacheVariables": {
40+
"TDI_TARGET": "es2k"
41+
}
42+
},
43+
{
44+
"name": "install-path-presets",
45+
"description": "Presets for install paths",
46+
"hidden": true,
47+
"cacheVariables": {
48+
"DEPEND_INSTALL_DIR": {
49+
"type": "PATH",
50+
"value": "$env{DEPEND_INSTALL}"
51+
},
52+
"SDE_INSTALL_DIR": {
53+
"type": "PATH",
54+
"value": "$env{SDE_INSTALL}"
55+
}
56+
}
57+
}
58+
]
59+
}

0 commit comments

Comments
 (0)