From 524ce1cc3ec2dd41ec410ea15683e4257e376f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20S=2E=20Ga=C3=9Fmann?= Date: Tue, 2 Jul 2024 12:34:41 +0200 Subject: [PATCH] build(CMake): Add basic CMake presets for MSVC --- c/.gitignore | 2 ++ c/CMakePresets.json | 73 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 c/CMakePresets.json 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