-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements CMakePresets.json to simplify project config.
Adds presets covering CI builds and generating MSVC solutions. Updates CI to use presets. Adds Ubuntu 20.04 to CI checks. Moves compiler configuration to presets. Adds example for CMakeUserPresets.json for users to copy for custom local presets.
- Loading branch information
Showing
8 changed files
with
262 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/build* | ||
/CMakeUserPresets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
{ | ||
"version": 2, | ||
"cmakeMinimumRequired": { | ||
"major": 3, | ||
"minor": 20, | ||
"patch": 0 | ||
}, | ||
"configurePresets": [ | ||
{ | ||
"name": "default", | ||
"displayName": "Default Config", | ||
"generator": "Ninja", | ||
"hidden": true, | ||
"binaryDir": "${sourceDir}/build", | ||
"cacheVariables": { | ||
"DSOUND": "OFF", | ||
"DDRAW": "OFF", | ||
"SDL2": "ON", | ||
"OPENAL": "ON", | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "default-win", | ||
"inherits": "default", | ||
"displayName": "MSVC defaults", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"VC_CXX_FLAGS": "/Zc:strictStrings", | ||
"CMAKE_CXX_FLAGS_RELEASE": "/MD /Zi /O2 /Ob2 /DNDEBUG", | ||
"CMAKE_EXE_LINKER_FLAGS_RELEASE": "/debug:full /INCREMENTAL:NO", | ||
"CMAKE_MODULE_LINKER_FLAGS_RELEASE": "/debug:full /INCREMENTAL:NO", | ||
"CMAKE_SHARED_LINKER_FLAGS_RELEASE": "/debug:full /INCREMENTAL:NO" | ||
} | ||
}, | ||
{ | ||
"name": "cl-remaster", | ||
"inherits": "default-win", | ||
"displayName": "MSVC Remaster build", | ||
"cacheVariables": { | ||
"BUILD_REMASTERTD": "ON", | ||
"BUILD_REMASTERRA": "ON", | ||
"BUILD_VANILLATD": "OFF", | ||
"BUILD_VANILLARA": "OFF", | ||
"MAP_EDITORTD": "OFF", | ||
"MAP_EDITORRA": "OFF", | ||
"BUILD_TOOLS": "OFF" | ||
} | ||
}, | ||
{ | ||
"name": "cl-vanilla", | ||
"inherits": "default-win", | ||
"displayName": "MSVC Vanilla build", | ||
"cacheVariables": { | ||
"BUILD_REMASTERTD": "OFF", | ||
"BUILD_REMASTERRA": "OFF", | ||
"MAP_EDITORTD": "ON", | ||
"MAP_EDITORRA": "ON", | ||
"BUILD_TOOLS": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "cl-vanilla-tests", | ||
"inherits": "cl-vanilla", | ||
"displayName": "MSVC Vanilla build with tests", | ||
"cacheVariables": { | ||
"BUILD_TEST": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "msvc2019-i686-remaster", | ||
"inherits": "cl-remaster", | ||
"binaryDir": "${sourceDir}/build_remaster", | ||
"displayName": "MSVC 2019 32bit Remaster build", | ||
"generator": "Visual Studio 16 2019", | ||
"architecture": "Win32" | ||
}, | ||
{ | ||
"name": "msvc2019-i686-vanilla", | ||
"inherits": "cl-vanilla", | ||
"binaryDir": "${sourceDir}/build_msvc32", | ||
"displayName": "MSVC 2019 32bit Vanilla build", | ||
"generator": "Visual Studio 16 2019", | ||
"architecture": "Win32" | ||
}, | ||
{ | ||
"name": "msvc2019-x86-64-vanilla", | ||
"inherits": "cl-vanilla", | ||
"binaryDir": "${sourceDir}/build_msvc64", | ||
"displayName": "MSVC 2019 64bit Vanilla build", | ||
"architecture": "x64" | ||
}, | ||
{ | ||
"name": "default-unix", | ||
"inherits": "default", | ||
"hidden": true, | ||
"displayName": "UNIX defaults", | ||
"cacheVariables": { | ||
"CMAKE_CXX_FLAGS_DEBUG": "-g3 -Og", | ||
"CMAKE_C_FLAGS_DEBUG": "-g3 -Og", | ||
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -g3 -DNDEBUG", | ||
"CMAKE_C_FLAGS_RELEASE": "-O3 -g3 -DNDEBUG", | ||
"VC_CXX_FLAGS": "-w;-Wwrite-strings;-Werror=write-strings;-fcheck-new;-fsigned-char;-DNOMINMAX", | ||
"MAP_EDITORTD": "ON", | ||
"MAP_EDITORRA": "ON", | ||
"BUILD_TOOLS": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "gcc-vanilla", | ||
"inherits": "default-unix", | ||
"displayName": "GCC Vanilla build", | ||
"environment": { | ||
"CC": "gcc", | ||
"CXX": "g++" | ||
} | ||
}, | ||
{ | ||
"name": "gcc-vanilla-tests", | ||
"inherits": "gcc-vanilla", | ||
"displayName": "GCC Vanilla build with tests", | ||
"cacheVariables": { | ||
"BUILD_TEST": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "clang-vanilla", | ||
"inherits": "default-unix", | ||
"displayName": "Clang Vanilla build", | ||
"environment": { | ||
"CC": "clang", | ||
"CXX": "clang++" | ||
} | ||
}, | ||
{ | ||
"name": "clang-vanilla-tests", | ||
"inherits": "clang-vanilla", | ||
"displayName": "Clang Vanilla build with tests", | ||
"cacheVariables": { | ||
"BUILD_TEST": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "default-mingw", | ||
"inherits": "default", | ||
"hidden": true, | ||
"displayName": "MinGW-w64 defaults", | ||
"cacheVariables": { | ||
"CMAKE_CXX_FLAGS_DEBUG": "-gstabs3 -Og", | ||
"CMAKE_C_FLAGS_DEBUG": "-gstabs3 -Og", | ||
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -gstabs3 -DNDEBUG", | ||
"CMAKE_C_FLAGS_RELEASE": "-O3 -gstabs3 -DNDEBUG", | ||
"VC_CXX_FLAGS": "-static-libstdc++;-static-libgcc;-fpermissive;-w;-Wwrite-strings;-Werror=write-strings;-fcheck-new;-fsigned-char;-DNOMINMAX", | ||
"MAP_EDITORTD": "ON", | ||
"MAP_EDITORRA": "ON", | ||
"BUILD_TOOLS": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "mingw-i686-remaster", | ||
"inherits": "default-mingw", | ||
"displayName": "MinGW-w64 32bit Remaster build", | ||
"cacheVariables": { | ||
"CMAKE_TOOLCHAIN_FILE": { | ||
"type": "FILEPATH", | ||
"value": "${sourceDir}/cmake/i686-mingw-w64-toolchain.cmake" | ||
}, | ||
"BUILD_REMASTERTD": "ON", | ||
"BUILD_REMASTERRA": "ON", | ||
"BUILD_VANILLATD": "OFF", | ||
"BUILD_VANILLARA": "OFF", | ||
"MAP_EDITORTD": "OFF", | ||
"MAP_EDITORRA": "OFF", | ||
"BUILD_TOOLS": "OFF" | ||
} | ||
}, | ||
{ | ||
"name": "mingw-i686-vanilla", | ||
"inherits": "default-mingw", | ||
"displayName": "MinGW-w64 32bit Vanilla build", | ||
"cacheVariables": { | ||
"CMAKE_TOOLCHAIN_FILE": { | ||
"type": "FILEPATH", | ||
"value": "${sourceDir}/cmake/i686-mingw-w64-toolchain.cmake" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "mingw-x86_64-vanilla", | ||
"inherits": "default-mingw", | ||
"displayName": "MinGW-w64 64bit Vanilla build", | ||
"cacheVariables": { | ||
"CMAKE_TOOLCHAIN_FILE": { | ||
"type": "FILEPATH", | ||
"value": "${sourceDir}/cmake/x86_64-mingw-w64-toolchain.cmake" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.