diff --git a/CMakePresets.json b/CMakePresets.json index 6408d61..36ae744 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -188,6 +188,16 @@ "windows" ] }, + { + "name": "ninja-clang-windows", + "inherits": [ + "base", + "ninja-multi-config", + "clang-cl", + "windows" + ], + "hidden": true + }, { "name": "vs2022-msvc-windows", "inherits": [ @@ -198,14 +208,16 @@ ] }, { - "name": "ninja-clang-windows", + "name": "vs2022-clang-windows", "inherits": [ "base", - "ninja-multi-config", + "vs2022", "clang-cl", "windows" ], - "hidden": true + "cacheVariables": { + "CMAKE_GENERATOR_TOOLSET": "ClangCL" + } } ], "buildPresets": [ @@ -301,39 +313,6 @@ "linux" ] }, - { - "name": "ninja-clang-windows-debug", - "displayName": "Ninja Clang Debug", - "description": "Build using Ninja Multi-Config generator and Clang compiler with Debug configuration", - "configurePreset": "ninja-clang-windows", - "configuration": "Debug", - "inherits": [ - "base", - "windows" - ] - }, - { - "name": "ninja-clang-windows-release", - "displayName": "Ninja Clang Release", - "description": "Build using Ninja Multi-Config generator and Clang compiler with Release configuration", - "configurePreset": "ninja-clang-windows", - "configuration": "Release", - "inherits": [ - "base", - "windows" - ] - }, - { - "name": "ninja-clang-windows-reldebinfo", - "displayName": "Ninja Clang RelWithDebInfo", - "description": "Build using Ninja Multi-Config generator and Clang compiler with RelWithDebInfo configuration", - "configurePreset": "ninja-clang-windows", - "configuration": "RelWithDebInfo", - "inherits": [ - "base", - "windows" - ] - }, { "name": "ninja-msvc-windows-debug", "displayName": "Ninja MSVC Debug", @@ -367,6 +346,39 @@ "windows" ] }, + { + "name": "ninja-clang-windows-debug", + "displayName": "Ninja Clang Debug", + "description": "Build using Ninja Multi-Config generator and Clang compiler with Debug configuration", + "configurePreset": "ninja-clang-windows", + "configuration": "Debug", + "inherits": [ + "base", + "windows" + ] + }, + { + "name": "ninja-clang-windows-release", + "displayName": "Ninja Clang Release", + "description": "Build using Ninja Multi-Config generator and Clang compiler with Release configuration", + "configurePreset": "ninja-clang-windows", + "configuration": "Release", + "inherits": [ + "base", + "windows" + ] + }, + { + "name": "ninja-clang-windows-reldebinfo", + "displayName": "Ninja Clang RelWithDebInfo", + "description": "Build using Ninja Multi-Config generator and Clang compiler with RelWithDebInfo configuration", + "configurePreset": "ninja-clang-windows", + "configuration": "RelWithDebInfo", + "inherits": [ + "base", + "windows" + ] + }, { "name": "vs2022-msvc-windows-debug", "displayName": "VS 2022 MSVC Debug", @@ -399,6 +411,39 @@ "base", "windows" ] + }, + { + "name": "vs2022-clang-windows-debug", + "displayName": "VS 2022 Clang Debug", + "description": "Build using Visual Studio 17 2022 generator and Clang compiler with Debug configuration", + "configurePreset": "vs2022-clang-windows", + "configuration": "Debug", + "inherits": [ + "base", + "windows" + ] + }, + { + "name": "vs2022-clang-windows-release", + "displayName": "VS 2022 Clang Release", + "description": "Build using Visual Studio 17 2022 generator and Clang compiler with Release configuration", + "configurePreset": "vs2022-clang-windows", + "configuration": "Release", + "inherits": [ + "base", + "windows" + ] + }, + { + "name": "vs2022-clang-windows-reldebinfo", + "displayName": "VS 2022 Clang RelWithDebInfo", + "description": "Build using Visual Studio 17 2022 generator and Clang compiler with RelWithDebInfo configuration", + "configurePreset": "vs2022-clang-windows", + "configuration": "RelWithDebInfo", + "inherits": [ + "base", + "windows" + ] } ] } diff --git a/cmake/CompileOptionsWindowsClang.cmake b/cmake/CompileOptionsWindowsClang.cmake index 804e718..04da1a6 100644 --- a/cmake/CompileOptionsWindowsClang.cmake +++ b/cmake/CompileOptionsWindowsClang.cmake @@ -12,6 +12,9 @@ add_compile_options( -msse4.2 # Enable SSE4.2 extended instruction set -fcf-protection=none # Instrument control-flow architecture protection + # Generator toolset ClangCL: Enable multi-processor compilation + $<$:/MP> + # Debug and RelWithDebInfo: Generate complete debug information in PDB files $<$,$>:/Zi>