Update to C++20 and see if our CI can handle it.

combined_windows_build
psi29a 3 years ago
parent f47e64b0f8
commit bb0dad7c08

@ -117,13 +117,13 @@ Coverity:
Ubuntu_GCC: Ubuntu_GCC:
extends: .Ubuntu extends: .Ubuntu
cache: cache:
key: Ubuntu_GCC.v2 key: Ubuntu_GCC.v3
before_script: before_script:
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic - CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic
variables: variables:
CC: gcc CC: gcc
CXX: g++ CXX: g++
CCACHE_SIZE: 3G CCACHE_SIZE: 4G
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks. # When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
timeout: 2h timeout: 2h
@ -414,7 +414,7 @@ variables: &tests-targets
after_script: after_script:
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log - Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
cache: cache:
key: ninja-v2 key: ninja-v3
paths: paths:
- ccache - ccache
- deps - deps
@ -550,7 +550,7 @@ variables: &tests-targets
after_script: after_script:
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log - Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
cache: cache:
key: msbuild-v2 key: msbuild-v3
paths: paths:
- ccache - ccache
- deps - deps
@ -614,7 +614,7 @@ Windows_MSBuild_Engine_RelWithDebInfo:
<<: *cs-targets <<: *cs-targets
config: "Debug" config: "Debug"
.Windows_MSBuild_CS_RelWithDebInfo: Windows_MSBuild_CS_RelWithDebInfo:
extends: extends:
- .Windows_MSBuild_Base - .Windows_MSBuild_Base
variables: variables:

@ -9,6 +9,7 @@ brew update --quiet
[ -z "${TRAVIS}" ] && brew uninstall --ignore-dependencies qt@6 || true [ -z "${TRAVIS}" ] && brew uninstall --ignore-dependencies qt@6 || true
# Some of these tools can come from places other than brew, so check before installing # Some of these tools can come from places other than brew, so check before installing
[ -z "${TRAVIS}" ] && brew reinstall xquartz
[ -z "${TRAVIS}" ] && brew reinstall fontconfig [ -z "${TRAVIS}" ] && brew reinstall fontconfig
command -v ccache >/dev/null 2>&1 || brew install ccache command -v ccache >/dev/null 2>&1 || brew install ccache
command -v cmake >/dev/null 2>&1 || brew install cmake command -v cmake >/dev/null 2>&1 || brew install cmake
@ -21,6 +22,6 @@ ccache --version
cmake --version cmake --version
qmake --version qmake --version
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20210716.zip -o ~/openmw-deps.zip curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20220225.zip -o ~/openmw-deps.zip
unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null

@ -608,12 +608,12 @@ if [ -z $SKIP_DOWNLOAD ]; then
"LuaJIT-2.1.0-beta3-msvc${MSVC_REAL_YEAR}-win${BITS}.7z" "LuaJIT-2.1.0-beta3-msvc${MSVC_REAL_YEAR}-win${BITS}.7z"
# Google test and mock # Google test and mock
if [ ! -z $TEST_FRAMEWORK ]; then if [ -n "$TEST_FRAMEWORK" ]; then
echo "Google test 1.10.0..." echo "Google test 1.11.0..."
if [ -d googletest ]; then if [ -d googletest ]; then
printf " Google test exists, skipping." printf " Google test exists, skipping."
else else
git clone -b release-1.10.0 https://github.com/google/googletest.git git clone -b release-1.11.0 https://github.com/google/googletest.git
fi fi
fi fi
@ -1002,8 +1002,8 @@ printf "LuaJIT 2.1.0-beta3... "
cd $DEPS cd $DEPS
echo echo
# Google Test and Google Mock # Google Test and Google Mock
if [ ! -z $TEST_FRAMEWORK ]; then if [ -n "$TEST_FRAMEWORK" ]; then
printf "Google test 1.10.0 ..." printf "Google test 1.11.0 ..."
cd googletest cd googletest
mkdir -p build${MSVC_REAL_YEAR} mkdir -p build${MSVC_REAL_YEAR}

@ -1,6 +1,6 @@
project(OpenMW) project(OpenMW)
cmake_minimum_required(VERSION 3.1.0) cmake_minimum_required(VERSION 3.1.0)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(GNUInstallDirs) include(GNUInstallDirs)

@ -139,14 +139,14 @@ Launcher::DataFilesPage::DataFilesPage(Files::ConfigurationManager &cfg, Config:
this, SLOT(updateNewProfileOkButton(QString))); this, SLOT(updateNewProfileOkButton(QString)));
connect(mCloneProfileDialog->lineEdit(), SIGNAL(textChanged(QString)), connect(mCloneProfileDialog->lineEdit(), SIGNAL(textChanged(QString)),
this, SLOT(updateCloneProfileOkButton(QString))); this, SLOT(updateCloneProfileOkButton(QString)));
connect(ui.directoryAddSubdirsButton, &QPushButton::released, this, [=]() { this->addSubdirectories(true); }); connect(ui.directoryAddSubdirsButton, &QPushButton::released, this, [this]() { this->addSubdirectories(true); });
connect(ui.directoryInsertButton, &QPushButton::released, this, [=]() { this->addSubdirectories(false); }); connect(ui.directoryInsertButton, &QPushButton::released, this, [this]() { this->addSubdirectories(false); });
connect(ui.directoryUpButton, &QPushButton::released, this, [=]() { this->moveDirectory(-1); }); connect(ui.directoryUpButton, &QPushButton::released, this, [this]() { this->moveDirectory(-1); });
connect(ui.directoryDownButton, &QPushButton::released, this, [=]() { this->moveDirectory(1); }); connect(ui.directoryDownButton, &QPushButton::released, this, [this]() { this->moveDirectory(1); });
connect(ui.directoryRemoveButton, &QPushButton::released, this, [=]() { this->removeDirectory(); }); connect(ui.directoryRemoveButton, &QPushButton::released, this, [this]() { this->removeDirectory(); });
connect(ui.archiveUpButton, &QPushButton::released, this, [=]() { this->moveArchive(-1); }); connect(ui.archiveUpButton, &QPushButton::released, this, [this]() { this->moveArchive(-1); });
connect(ui.archiveDownButton, &QPushButton::released, this, [=]() { this->moveArchive(1); }); connect(ui.archiveDownButton, &QPushButton::released, this, [this]() { this->moveArchive(1); });
connect(ui.directoryListWidget->model(), &QAbstractItemModel::rowsMoved, this, [=]() { this->sortDirectories(); }); connect(ui.directoryListWidget->model(), &QAbstractItemModel::rowsMoved, this, [this]() { this->sortDirectories(); });
buildView(); buildView();
loadSettings(); loadSettings();

@ -155,7 +155,7 @@ namespace MWLua
template<class G> template<class G>
sol::object get(const Context& context, std::string_view prop, G getter) const sol::object get(const Context& context, std::string_view prop, G getter) const
{ {
return getValue(context, mObject, &DynamicStat::setValue, mIndex, prop, [=](const MWLua::Object* obj) return getValue(context, mObject, &DynamicStat::setValue, mIndex, prop, [this, getter](const MWLua::Object* obj)
{ {
const auto& ptr = obj->ptr(); const auto& ptr = obj->ptr();
return (ptr.getClass().getCreatureStats(ptr).getDynamic(mIndex).*getter)(); return (ptr.getClass().getCreatureStats(ptr).getDynamic(mIndex).*getter)();
@ -202,7 +202,7 @@ namespace MWLua
template<class G> template<class G>
sol::object get(const Context& context, std::string_view prop, G getter) const sol::object get(const Context& context, std::string_view prop, G getter) const
{ {
return getValue(context, mObject, &AttributeStat::setValue, mIndex, prop, [=](const MWLua::Object* obj) return getValue(context, mObject, &AttributeStat::setValue, mIndex, prop, [this, getter](const MWLua::Object* obj)
{ {
const auto& ptr = obj->ptr(); const auto& ptr = obj->ptr();
return (ptr.getClass().getCreatureStats(ptr).getAttribute(mIndex).*getter)(); return (ptr.getClass().getCreatureStats(ptr).getAttribute(mIndex).*getter)();
@ -266,7 +266,7 @@ namespace MWLua
template<class G> template<class G>
sol::object get(const Context& context, std::string_view prop, G getter) const sol::object get(const Context& context, std::string_view prop, G getter) const
{ {
return getValue(context, mObject, &SkillStat::setValue, mIndex, prop, [=](const MWLua::Object* obj) return getValue(context, mObject, &SkillStat::setValue, mIndex, prop, [this, getter](const MWLua::Object* obj)
{ {
const auto& ptr = obj->ptr(); const auto& ptr = obj->ptr();
return (ptr.getClass().getNpcStats(ptr).getSkill(mIndex).*getter)(); return (ptr.getClass().getNpcStats(ptr).getSkill(mIndex).*getter)();
@ -275,7 +275,7 @@ namespace MWLua
sol::object getProgress(const Context& context) const sol::object getProgress(const Context& context) const
{ {
return getValue(context, mObject, &SkillStat::setValue, mIndex, "progress", [=](const MWLua::Object* obj) return getValue(context, mObject, &SkillStat::setValue, mIndex, "progress", [this](const MWLua::Object* obj)
{ {
const auto& ptr = obj->ptr(); const auto& ptr = obj->ptr();
return getProgress(ptr, mIndex, ptr.getClass().getNpcStats(ptr).getSkill(mIndex)); return getProgress(ptr, mIndex, ptr.getClass().getNpcStats(ptr).getSkill(mIndex));

@ -731,7 +731,7 @@ namespace fx
for (auto t = mLexer->next(); !std::holds_alternative<Lexer::Eof>(t); t = mLexer->next()) for (auto t = mLexer->next(); !std::holds_alternative<Lexer::Eof>(t); t = mLexer->next())
{ {
std::visit([=](auto&& arg) { std::visit([this](auto&& arg) {
using T = std::decay_t<decltype(arg)>; using T = std::decay_t<decltype(arg)>;
if constexpr (std::is_same_v<Lexer::Shared, T>) if constexpr (std::is_same_v<Lexer::Shared, T>)

Loading…
Cancel
Save