Skip to content

Commit

Permalink
Cmake: Add presets for local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Dasperal committed Jul 20, 2024
1 parent 807294c commit 9c677e2
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build*/
build*/
CMakeUserPresets.json
45 changes: 45 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
},
"binaryDir": "${sourceDir}/build"
},
{
"name": "local-watcom-dev",
"hidden": true,
"inherits": ["watcom", "dev"],
"displayName": "Watcom (Local|Dev)",
"description": "Watcom configuration for local Dev builds"
},
{
"name": "ci-watcom-dev",
"inherits": ["watcom", "dev", "ci"],
Expand All @@ -68,6 +75,13 @@
"inherits": ["watcom", "release", "ci"],
"displayName": "Watcom (CI|Release)",
"description": "Watcom configuration for CI Release builds"
},
{
"name": "local-watcom-release",
"inherits": ["watcom", "release"],
"displayName": "Watcom (Local|Release)",
"description": "Watcom configuration for local Release builds",
"binaryDir": "${sourceDir}/build"
}
],
"buildPresets": [
Expand All @@ -92,6 +106,12 @@
"lhs": "$penv{CI}",
"rhs": "true"
}
},
{
"name": "local-watcom-release",
"configurePreset": "local-watcom-release",
"displayName": "Watcom (Local|Release)",
"description": "Cmake build configuration for Local Release builds using Watcom"
}
],
"packagePresets": [
Expand All @@ -105,6 +125,12 @@
"lhs": "$penv{CI}",
"rhs": "true"
}
},
{
"name": "local-watcom-release",
"configurePreset": "local-watcom-release",
"displayName": "Watcom (Local|Release)",
"description": "Cpack configuration for Local Release builds using Watcom"
}
],
"workflowPresets": [
Expand Down Expand Up @@ -141,6 +167,25 @@
"name": "ci-watcom-release"
}
]
},
{
"name": "local-watcom-release",
"displayName": "Watcom (Local|Release)",
"description": "Workflow for Local Release builds using Watcom",
"steps": [
{
"type": "configure",
"name": "local-watcom-release"
},
{
"type": "build",
"name": "local-watcom-release"
},
{
"type": "package",
"name": "local-watcom-release"
}
]
}
]
}
28 changes: 28 additions & 0 deletions CMakeUserPresets.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": 6,
"configurePresets": [
{
"name": "clion",
"hidden": true,
"vendor": {
"jetbrains.com/clion": {
"toolchain": "Docker Russian Doom DOS"
}
}
},
{
"name": "clion-watcom-dev",
"inherits": ["local-watcom-dev", "clion"],
"displayName": "Watcom (Clion|Dev)",
"description": "Watcom configuration for Clion Dev builds",
"binaryDir": "${sourceDir}/build-dev"
},
{
"name": "clion-watcom-release",
"inherits": ["local-watcom-release", "clion"],
"displayName": "Watcom (Clion|Release)",
"description": "Watcom configuration for Clion Release builds",
"binaryDir": "${sourceDir}/build-release"
}
]
}

0 comments on commit 9c677e2

Please sign in to comment.