Clean up CMakeLists a bit in the process: * Define more cmake vars in CMakePresets * Split linux/windows presets into separate files
218 lines
5.9 KiB
JSON
218 lines
5.9 KiB
JSON
{
|
|
"version": 4,
|
|
"cmakeMinimumRequired": {
|
|
"major": 3,
|
|
"minor": 23,
|
|
"patch": 0
|
|
},
|
|
|
|
"configurePresets": [
|
|
{
|
|
"name": "spark",
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Windows"
|
|
},
|
|
"generator": "Visual Studio 17 2022",
|
|
"binaryDir": "${sourceDir}/build",
|
|
"cacheVariables": {
|
|
"CMAKE_CXX_FLAGS": "/MP /WX /wd4250 /wd4251 /wd4244 /wd4267 /wd4355 /wd4275 /wd4345 /bigobj /EHsc /DCURL_STATICLIB /D_WINSOCK_DEPRECATED_NO_WARNINGS /D__TBB_NO_IMPLICIT_LINKAGE /DBOOST_ALL_NO_LIB /std:c++17 /D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600",
|
|
"CMAKE_CXX_FLAGS_DEBUG": "/MTd",
|
|
"CMAKE_CXX_FLAGS_RELEASE": "/MT",
|
|
"CMAKE_SHARED_LINKER_FLAGS_RELEASE": "/DEBUG /OPT:REF /OPT:ICF /LTCG",
|
|
"EXTERNALS_ROOT": "${sourceDir}/externals/windows"
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "sparkd",
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Linux"
|
|
},
|
|
"hidden": true,
|
|
"generator": "Ninja",
|
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
|
"cacheVariables": {
|
|
"platform": "",
|
|
"CMAKE_BUILD_WITH_INSTALL_RPATH": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"CMAKE_INSTALL_RPATH": ".",
|
|
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}/sparkd",
|
|
"CMAKE_EXE_LINKER_FLAGS": "-Wno-undef",
|
|
"EXTERNALS_ROOT": "${sourceDir}/externals/linux",
|
|
"CMAKE_CXX_STANDARD": "17",
|
|
"WEB_TSCONFIG_NAME": "${presetName}",
|
|
"BUILD_SDK": {
|
|
"type": "BOOL",
|
|
"value": "OFF"
|
|
},
|
|
"BUILD_WEB": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
}
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-dev-clang",
|
|
"inherits": "sparkd",
|
|
"displayName": "Development (clang)",
|
|
"description": "Debug build compiled w/ clang",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug",
|
|
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"CMAKE_C_COMPILER": "clang",
|
|
"CMAKE_CXX_COMPILER": "clang++",
|
|
"CMAKE_CXX_FLAGS_DEBUG": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color"
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-dev-gcc",
|
|
"inherits": "sparkd",
|
|
"displayName": "Development (gcc)",
|
|
"description": "Debug build compiled w/ gcc",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug",
|
|
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
|
"type": "BOOL",
|
|
"value": "ON"
|
|
},
|
|
"CMAKE_C_COMPILER": "gcc",
|
|
"CMAKE_CXX_COMPILER": "g++",
|
|
"CMAKE_CXX_FLAGS_DEBUG": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color -Wno-stringop-overread -DDEBUG"
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-prod-clang",
|
|
"inherits": "sparkd",
|
|
"displayName": "Production (clang)",
|
|
"description": "Release build compiled w/ clang",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Release",
|
|
"CMAKE_C_COMPILER": "clang",
|
|
"CMAKE_CXX_COMPILER": "clang++",
|
|
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color -fno-omit-frame-pointer -DNDEBUG -O3"
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-prod-gcc",
|
|
"inherits": "sparkd",
|
|
"displayName": "Production (gcc)",
|
|
"description": "Release build compiled w/ gcc",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Release",
|
|
"CMAKE_C_COMPILER": "gcc",
|
|
"CMAKE_CXX_COMPILER": "g++",
|
|
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color -Wno-stringop-overread -fno-omit-frame-pointer -DNDEBUG -O3"
|
|
}
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-publish",
|
|
"inherits": "sparkd",
|
|
"displayName": "Publish",
|
|
"description": "Publish build compiled w/ gcc and ready to ship",
|
|
"cacheVariables": {
|
|
"CMAKE_CXX_COMPILER": "g++"
|
|
}
|
|
}
|
|
],
|
|
|
|
"buildPresets": [
|
|
{
|
|
"name": "spark",
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Windows"
|
|
},
|
|
"hidden": true,
|
|
"jobs": 4
|
|
},
|
|
|
|
{
|
|
"name": "spark-dev",
|
|
"displayName": "Development",
|
|
"inherits": "spark",
|
|
"configurePreset": "spark",
|
|
"configuration": "Debug"
|
|
},
|
|
|
|
{
|
|
"name": "spark-prod",
|
|
"displayName": "Production",
|
|
"inherits": "spark",
|
|
"configurePreset": "spark",
|
|
"configuration": "Release"
|
|
},
|
|
|
|
{
|
|
"name": "sparkd",
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Linux"
|
|
},
|
|
"hidden": true,
|
|
"jobs": 4,
|
|
"targets": [
|
|
"data_files_dir",
|
|
"doc_manual_bundle",
|
|
"install",
|
|
"libspark",
|
|
"rapidjson_project",
|
|
"server_layout",
|
|
"sparkd",
|
|
"web_ui_bundle"
|
|
]
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-dev-clang",
|
|
"configurePreset": "sparkd-dev-clang",
|
|
"displayName": "Development (clang)",
|
|
"inherits": "sparkd"
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-dev-gcc",
|
|
"configurePreset": "sparkd-dev-gcc",
|
|
"displayName": "Development (gcc)",
|
|
"inherits": "sparkd"
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-prod-clang",
|
|
"configurePreset": "sparkd-prod-clang",
|
|
"displayName": "Production (clang)",
|
|
"inherits": "sparkd"
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-prod-gcc",
|
|
"configurePreset": "sparkd-prod-gcc",
|
|
"displayName": "Production (gcc)",
|
|
"inherits": "sparkd"
|
|
},
|
|
|
|
{
|
|
"name": "sparkd-publish",
|
|
"configurePreset": "sparkd-publish",
|
|
"displayName": "Publish",
|
|
"inherits": "sparkd",
|
|
"targets": "install"
|
|
}
|
|
]
|
|
}
|