From af7d19a956ac20ab43d1ed536f79c2c6c3c4dadc Mon Sep 17 00:00:00 2001 From: Grayson Riffe Date: Thu, 23 Jan 2025 16:14:40 -0600 Subject: [PATCH] Add CMake project --- .gitignore | 1 + CMakeLists.txt | 4 ++++ CMakePresets.json | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 CMakePresets.json diff --git a/.gitignore b/.gitignore index 88dbff1..9a44da1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .vs/ +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..78d6de5 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,4 @@ +# Main NF CMakeLists.txt +cmake_minimum_required(VERSION 3.20) + +project(nf) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..2b77825 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,49 @@ +// NF CMake presets +{ + "version": 3, + + "configurePresets": [ + { + "name": "base", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe" + } + }, + + { + "name": "Debug", + "inherits": "base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + + { + "name": "Release", + "inherits": "base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ], + + "buildPresets": [ + { + "name": "Debug", + "configurePreset": "Debug" + }, + + { + "name": "Release", + "configurePreset": "Release" + } + ] +}