From 8c964639e86254c30e696c3c6a06bdd619e4fa7a Mon Sep 17 00:00:00 2001 From: Alexander Spiller Date: Tue, 2 Jul 2024 22:09:57 +0200 Subject: [PATCH] build: Added support for MS Visual Studio 2022 in CMake-configuration. --- CMakePresets.json | 62 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 541a9e5..c2d4597 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -7,8 +7,8 @@ }, "configurePresets": [ { - "name": "dev", - "displayName": "Development Mode", + "name": "devUNIX", + "displayName": "Development Mode - Unix Makefiles", "description": "Build with warnings and debug symbols", "binaryDir": "build", "generator": "Unix Makefiles", @@ -17,8 +17,8 @@ } }, { - "name": "system", - "displayName": "Build for system installation", + "name": "systemUNIX", + "displayName": "Build for system installation - Unix Makefiles", "description": "Build for system installation (MATPLOTPP_BUILD_EXAMPLES and MATPLOTPP_BUILD_TESTS are OFF)", "binaryDir": "${sourceDir}/build/system", "generator": "Unix Makefiles", @@ -31,30 +31,66 @@ } }, { - "name": "local", - "displayName": "Build for installation in $HOME/.local", + "name": "localUNIX", + "displayName": "Build for installation in $HOME/.local - Unix Makefiles", "description": "Build for installaton in $HOME/.local", - "inherits": "system", + "inherits": "systemUNIX", "binaryDir": "${sourceDir}/build/local", "installDir": "$env{HOME}/.local" + }, + { + "name": "devMSVC2022", + "displayName": "Development Mode - Visual Studio 2022", + "description": "Build with warnings and debug symbols", + "binaryDir": "build", + "generator": "Visual Studio 17 2022", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo" + } + }, + { + "name": "systemMSVC2022", + "displayName": "Build for system installation - Visual Studio 2022", + "description": "Build for system installation (MATPLOTPP_BUILD_EXAMPLES and MATPLOTPP_BUILD_TESTS are OFF)", + "binaryDir": "${sourceDir}/build/system", + "generator": "Visual Studio 17 2022", + "cacheVariables": { + "MATPLOTPP_BUILD_EXAMPLES": "OFF", + "MATPLOTPP_BUILD_TESTS": "OFF", + "MATPLOTPP_BUILD_SHARED_LIBS": "ON", + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON" + } } ], "buildPresets": [ { - "name": "dev", - "configurePreset": "dev", + "name": "devUNIX", + "configurePreset": "devUNIX", "configuration": "RelWithDebInfo", "jobs": 8 }, { - "name": "system", - "configurePreset": "system", + "name": "systemUNIX", + "configurePreset": "systemUNIX", "configuration": "Release", "jobs": 8 }, { - "name": "local", - "configurePreset": "local", + "name": "localUNIX", + "configurePreset": "localUNIX", + "configuration": "Release", + "jobs": 8 + }, + { + "name": "devMSVC2022", + "configurePreset": "devMSVC2022", + "configuration": "RelWithDebInfo", + "jobs": 8 + }, + { + "name": "systemMSVC2022", + "configurePreset": "systemMSVC2022", "configuration": "Release", "jobs": 8 } -- 2.43.0.windows.1