aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik S. Gaßmann <[email protected]>2024-07-02 12:34:41 +0200
committerJack O'Connor <[email protected]>2024-07-09 13:20:22 -0400
commit524ce1cc3ec2dd41ec410ea15683e4257e376f83 (patch)
treeda50d9f79ac50148a5c57b5fe059eef3a8fc70a1
parent330af75f5ba7fcb73b9333d1e2e52017a4430654 (diff)
build(CMake): Add basic CMake presets for MSVC
-rw-r--r--c/.gitignore2
-rw-r--r--c/CMakePresets.json73
2 files changed, 75 insertions, 0 deletions
diff --git a/c/.gitignore b/c/.gitignore
index 3d4b704..ff52a80 100644
--- a/c/.gitignore
+++ b/c/.gitignore
@@ -2,3 +2,5 @@ blake3
example
build/
*.o
+
+CMakeUserPresets.json
diff --git a/c/CMakePresets.json b/c/CMakePresets.json
new file mode 100644
index 0000000..ffb35db
--- /dev/null
+++ b/c/CMakePresets.json
@@ -0,0 +1,73 @@
+{
+ "version": 3,
+ "cmakeMinimumRequired": {
+ "major": 3,
+ "minor": 22,
+ "patch": 0
+ },
+ "configurePresets": [
+ {
+ "name": "base",
+ "hidden": true,
+ "binaryDir": "${sourceDir}/build/${presetName}"
+ },
+ {
+ "name": "msvc",
+ "hidden": true,
+ "generator": "Visual Studio 17 2022",
+ "vendor": {
+ "microsoft.com/VisualStudioSettings/CMake/1.0": {
+ "hostOS": [
+ "Windows"
+ ]
+ }
+ }
+ },
+ {
+ "name": "x64-windows-msvc",
+ "inherits": [
+ "msvc",
+ "base"
+ ],
+ "architecture": "x64"
+ },
+ {
+ "name": "x86-windows-msvc",
+ "inherits": [
+ "msvc",
+ "base"
+ ],
+ "architecture": "Win32"
+ },
+ {
+ "name": "arm64-windows-msvc",
+ "inherits": [
+ "msvc",
+ "base"
+ ],
+ "architecture": "ARM64"
+ }
+ ],
+ "buildPresets": [
+ {
+ "name": "x64-windows-msvc-debug",
+ "configurePreset": "x64-windows-msvc",
+ "configuration": "Debug"
+ },
+ {
+ "name": "x64-windows-msvc-release",
+ "configurePreset": "x64-windows-msvc",
+ "configuration": "RelWithDebInfo"
+ },
+ {
+ "name": "x86-windows-msvc-debug",
+ "configurePreset": "x86-windows-msvc",
+ "configuration": "Debug"
+ },
+ {
+ "name": "x86-windows-msvc-release",
+ "configurePreset": "x86-windows-msvc",
+ "configuration": "RelWithDebInfo"
+ }
+ ]
+} \ No newline at end of file