mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
update cmake configs
This commit is contained in:
parent
04a7bc2b8d
commit
ef8029d46f
@ -74,7 +74,7 @@ if(UNIX)
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC")
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
# Skip warning for invalid conversion from size_t to uint32_t for all targets below for now
|
# Skip warning for invalid conversion from size_t to uint32_t for all targets below for now
|
||||||
add_compile_options("/wd4267" "/utf-8")
|
add_compile_options("/wd4267" "/utf-8" "/volatile:iso")
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
@ -14,32 +14,32 @@
|
|||||||
"generator": "Unix Makefiles"
|
"generator": "Unix Makefiles"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "debug-base",
|
"name": "debug-config",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Debug"
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "release-base",
|
"name": "release-config",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release"
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "clang-base",
|
"name": "clang-config",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-clang.cmake"
|
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-clang.cmake"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "gcc-base",
|
"name": "gcc-config",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-gcc.cmake"
|
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-gcc.cmake"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-windows-2022",
|
"name": "windows-msvc",
|
||||||
"displayName": "CI configure step for Windows",
|
"displayName": "[Multi] Windows (MSVC)",
|
||||||
"description": "Set architecture to 64-bit (b/c RakNet)",
|
"description": "Set architecture to 64-bit (b/c RakNet)",
|
||||||
"inherits": "default",
|
"inherits": "default",
|
||||||
"generator": "Visual Studio 17 2022",
|
"generator": "Visual Studio 17 2022",
|
||||||
@ -57,7 +57,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "windows-default",
|
"name": "windows-default",
|
||||||
"inherits": "ci-windows-2022",
|
"inherits": "windows-msvc",
|
||||||
"displayName": "Windows only Configure Settings",
|
"displayName": "Windows only Configure Settings",
|
||||||
"description": "Sets build and install directories",
|
"description": "Sets build and install directories",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
@ -72,7 +72,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "linux-base",
|
"name": "linux-config",
|
||||||
"inherits": "default",
|
"inherits": "default",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"condition": {
|
"condition": {
|
||||||
@ -82,7 +82,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "macos-base",
|
"name": "macos-config",
|
||||||
"inherits": "default",
|
"inherits": "default",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"condition": {
|
"condition": {
|
||||||
@ -94,9 +94,9 @@
|
|||||||
{
|
{
|
||||||
"name": "linux-clang-debug",
|
"name": "linux-clang-debug",
|
||||||
"inherits": [
|
"inherits": [
|
||||||
"linux-base",
|
"linux-config",
|
||||||
"clang-base",
|
"clang-config",
|
||||||
"debug-base"
|
"debug-config"
|
||||||
],
|
],
|
||||||
"displayName": "[Debug] Linux (Clang)",
|
"displayName": "[Debug] Linux (Clang)",
|
||||||
"description": "Create a debug build using the Clang toolchain for Linux"
|
"description": "Create a debug build using the Clang toolchain for Linux"
|
||||||
@ -104,9 +104,9 @@
|
|||||||
{
|
{
|
||||||
"name": "linux-clang-release",
|
"name": "linux-clang-release",
|
||||||
"inherits": [
|
"inherits": [
|
||||||
"linux-base",
|
"linux-config",
|
||||||
"clang-base",
|
"clang-config",
|
||||||
"release-base"
|
"release-config"
|
||||||
],
|
],
|
||||||
"displayName": "[Release] Linux (Clang)",
|
"displayName": "[Release] Linux (Clang)",
|
||||||
"description": "Create a release build using the Clang toolchain for Linux"
|
"description": "Create a release build using the Clang toolchain for Linux"
|
||||||
@ -114,9 +114,9 @@
|
|||||||
{
|
{
|
||||||
"name": "linux-gcc-debug",
|
"name": "linux-gcc-debug",
|
||||||
"inherits": [
|
"inherits": [
|
||||||
"linux-base",
|
"linux-config",
|
||||||
"gcc-base",
|
"gcc-config",
|
||||||
"debug-base"
|
"debug-config"
|
||||||
],
|
],
|
||||||
"displayName": "[Debug] Linux (GCC)",
|
"displayName": "[Debug] Linux (GCC)",
|
||||||
"description": "Create a debug build using the GNU toolchain for Linux"
|
"description": "Create a debug build using the GNU toolchain for Linux"
|
||||||
@ -124,9 +124,9 @@
|
|||||||
{
|
{
|
||||||
"name": "linux-gcc-release",
|
"name": "linux-gcc-release",
|
||||||
"inherits": [
|
"inherits": [
|
||||||
"linux-base",
|
"linux-config",
|
||||||
"gcc-base",
|
"gcc-config",
|
||||||
"release-base"
|
"release-config"
|
||||||
],
|
],
|
||||||
"displayName": "[Release] Linux (GCC)",
|
"displayName": "[Release] Linux (GCC)",
|
||||||
"description": "Create a release build using the GNU toolchain for Linux"
|
"description": "Create a release build using the GNU toolchain for Linux"
|
||||||
@ -134,8 +134,8 @@
|
|||||||
{
|
{
|
||||||
"name": "macos-debug",
|
"name": "macos-debug",
|
||||||
"inherits": [
|
"inherits": [
|
||||||
"macos-base",
|
"macos-config",
|
||||||
"release-base"
|
"release-config"
|
||||||
],
|
],
|
||||||
"displayName": "[Debug] MacOS",
|
"displayName": "[Debug] MacOS",
|
||||||
"description": "Create a debug build using MacOS"
|
"description": "Create a debug build using MacOS"
|
||||||
@ -143,8 +143,8 @@
|
|||||||
{
|
{
|
||||||
"name": "macos-release",
|
"name": "macos-release",
|
||||||
"inherits": [
|
"inherits": [
|
||||||
"macos-base",
|
"macos-config",
|
||||||
"release-base"
|
"release-config"
|
||||||
],
|
],
|
||||||
"displayName": "[Release] MacOS",
|
"displayName": "[Release] MacOS",
|
||||||
"description": "Create a release build using MacOS"
|
"description": "Create a release build using MacOS"
|
||||||
@ -159,13 +159,21 @@
|
|||||||
"jobs": 2
|
"jobs": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-windows-2022",
|
"name": "windows-msvc-debug",
|
||||||
"configurePreset": "ci-windows-2022",
|
"configurePreset": "windows-msvc",
|
||||||
"displayName": "Windows CI Build",
|
"displayName": "[Debug] Windows (MSVC)",
|
||||||
"description": "This preset is used by the CI build on windows",
|
"description": "This preset is used to build in debug mode using the MSVC toolchain on Windows",
|
||||||
"configuration": "Release",
|
"configuration": "Debug",
|
||||||
"jobs": 2
|
"jobs": 2
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc-release",
|
||||||
|
"configurePreset": "windows-msvc",
|
||||||
|
"displayName": "[Release] Windows (MSVC)",
|
||||||
|
"description": "This preset is used to build in release mode using the MSVC toolchain on Windows",
|
||||||
|
"configuration": "Release",
|
||||||
|
"jobs": 2
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "linux-clang-debug",
|
"name": "linux-clang-debug",
|
||||||
"configurePreset": "linux-clang-debug",
|
"configurePreset": "linux-clang-debug",
|
||||||
@ -227,11 +235,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-windows-2022",
|
"name": "windows-msvc",
|
||||||
"inherits": "default",
|
"inherits": "default",
|
||||||
"configurePreset": "ci-windows-2022",
|
"configurePreset": "windows-msvc",
|
||||||
"displayName": "CI Tests on windows",
|
"displayName": "[Multi] Windows (MSVC)",
|
||||||
"description": "Runs all tests on a windows configuration",
|
"description": "Runs all tests on a Windows configuration",
|
||||||
"configuration": "Release",
|
"configuration": "Release",
|
||||||
"filter": {
|
"filter": {
|
||||||
"exclude": {
|
"exclude": {
|
||||||
@ -313,15 +321,15 @@
|
|||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"type": "configure",
|
"type": "configure",
|
||||||
"name": "ci-windows-2022"
|
"name": "windows-msvc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "build",
|
"type": "build",
|
||||||
"name": "ci-windows-2022"
|
"name": "windows-msvc-release"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "test",
|
"type": "test",
|
||||||
"name": "ci-windows-2022"
|
"name": "windows-msvc"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
2
build.sh
2
build.sh
@ -6,7 +6,7 @@ mkdir -p build
|
|||||||
cd build
|
cd build
|
||||||
|
|
||||||
# Run cmake to generate make files
|
# Run cmake to generate make files
|
||||||
cmake .. -DCMAKE_BUILD_TYPE="Release"
|
cmake -DCMAKE_BUILD_TYPE="Release" ..
|
||||||
|
|
||||||
# To build utilizing multiple cores, append `-j` and the amount of cores to utilize, for example `cmake --build . --config Release -j8'
|
# To build utilizing multiple cores, append `-j` and the amount of cores to utilize, for example `cmake --build . --config Release -j8'
|
||||||
cmake --build . --config Release $1
|
cmake --build . --config Release $1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Try and find a gcc/g++ install, falling back to a generic clang install otherwise
|
# Try and find a gcc/g++ install
|
||||||
find_program(GNU_C_COMPILER gcc REQUIRED)
|
find_program(GNU_C_COMPILER gcc REQUIRED)
|
||||||
find_program(GNU_CXX_COMPILER g++ REQUIRED)
|
find_program(GNU_CXX_COMPILER g++ REQUIRED)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user