Skip to content

Commit

Permalink
Add Clang (MSVC compatible) build target
Browse files Browse the repository at this point in the history
  • Loading branch information
kryzet committed Nov 26, 2024
1 parent 4f30eeb commit 2631999
Showing 1 changed file with 70 additions and 13 deletions.
83 changes: 70 additions & 13 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": 3,
"configurePresets": [
{
"name": "windows-base",
"name": "windows-msvc",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
Expand All @@ -18,9 +18,9 @@
}
},
{
"name": "x64-debug",
"displayName": "x64 Debug",
"inherits": "windows-base",
"name": "x64-debug-msvc",
"displayName": "x64 Debug - MSVC",
"inherits": "windows-msvc",
"architecture": {
"value": "x64",
"strategy": "external"
Expand All @@ -30,17 +30,17 @@
}
},
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "x64-debug",
"name": "x64-release-msvc",
"displayName": "x64 Release - MSVC",
"inherits": "x64-debug-msvc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "x86-debug",
"displayName": "x86 Debug",
"inherits": "windows-base",
"name": "x86-debug-msvc",
"displayName": "x86 Debug - MSVC",
"inherits": "windows-msvc",
"architecture": {
"value": "x86",
"strategy": "external"
Expand All @@ -50,12 +50,69 @@
}
},
{
"name": "x86-release",
"displayName": "x86 Release",
"inherits": "x86-debug",
"name": "x86-release-msvc",
"displayName": "x86 Release - MSVC",
"inherits": "x86-debug-msvc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "windows-clang",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang-cl",
"CMAKE_CXX_COMPILER": "clang-cl"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "x64-debug-clang",
"displayName": "x64 Debug - Clang",
"inherits": "windows-clang",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x64-release-clang",
"displayName": "x64 Release - Clang",
"inherits": "x64-debug-clang",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "x86-debug-clang",
"displayName": "x86 Debug - Clang",
"inherits": "windows-clang",
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x86-release-clang",
"displayName": "x86 Release - Clang",
"inherits": "x86-debug-clang",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
}

]
}

0 comments on commit 2631999

Please sign in to comment.