update CMake presets

This commit is contained in:
jadebenn 2024-04-03 19:48:20 -05:00
parent 199c8224a5
commit bba825f0c8
2 changed files with 48 additions and 11 deletions

View File

@ -58,7 +58,8 @@ if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wuninitialized -fPIC")
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0 _GLIBCXX_USE_CXX17_ABI=0)
if(NOT APPLE)
# For all except Clang and Apple Clang
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -lstdc++fs")
endif()
@ -73,7 +74,6 @@ if(UNIX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC")
elseif(MSVC)
# Skip warning for invalid conversion from size_t to uint32_t for all targets below for now
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
add_compile_options ("/wd4267" "/utf-8")
elseif(WIN32)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)

View File

@ -19,8 +19,7 @@
"description": "Same as default, Used in GitHub actions workflow",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
"CMAKE_BUILD_TYPE": "Release"
}
},
{
@ -30,7 +29,6 @@
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_CXX_FLAGS_INIT" : "-Og",
"CMAKE_C_FLAGS_INIT" : "-Og"
}
@ -39,7 +37,19 @@
"name": "ci-macos-13",
"displayName": "CI configure step for MacOS",
"description": "Same as default, Used in GitHub actions workflow",
"inherits": "default"
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "debug-macos-13",
"displayName": "Debug configure step for MacOS",
"description": "Used to generate debug configuration for MacOS",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "ci-windows-2022",
@ -52,8 +62,20 @@
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_CXX_FLAGS_INIT": "/O2 /Zc:inline"
"CMAKE_CXX_FLAGS_INIT": "/Zc:inline"
}
},
{
"name": "debug-windows-2022",
"displayName": "Debug configure step for Windows",
"description": "Set architecture to 64-bit (b/c RakNet)",
"inherits": "default",
"generator": "Visual Studio 17 2022",
"architecture": {
"value": "x64"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
@ -100,12 +122,27 @@
"configuration": "Release",
"jobs": 2
},
{
"name": "debug-windows-2022",
"configurePreset": "debug-windows-2022",
"displayName": "Windows Debug Build",
"description": "This preset is used to debug the build on windows",
"configuration": "Release",
"jobs": 2
},
{
"name": "ci-macos-13",
"configurePreset": "ci-macos-13",
"displayName": "MacOS CI Build",
"description": "This preset is used by the CI build on MacOS",
"jobs": 2
},
{
"name": "debug-macos-13",
"configurePreset": "debug-macos-13",
"displayName": "MacOS Debug Build",
"description": "This preset is used to debug the build on MacOS",
"jobs": 2
}
],
"testPresets": [