From 87880db9623ef9a01b98d9b1c46990b6f034a94c Mon Sep 17 00:00:00 2001 From: glx22 Date: Tue, 16 Jan 2024 23:10:54 +0100 Subject: [PATCH] Test --- .github/workflows/ci-build.yml | 6 +++++- src/3rdparty/squirrel/squirrel/sqstate.cpp | 2 ++ src/order_cmd.cpp | 2 ++ src/road.h | 9 +++++++++ src/stdafx.h | 3 +++ src/town_cmd.cpp | 2 ++ 6 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index df771b6012cd9..1f9a72c9b76ff 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -172,7 +172,7 @@ jobs: cd build echo "::group::CMake" - cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ matrix.extra-cmake-parameters }} + cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ matrix.extra-cmake-parameters }} -DCMAKE_BUILD_TYPE=RelWithDebInfo echo "::endgroup::" echo "::group::Build" @@ -247,6 +247,8 @@ jobs: -DCMAKE_OSX_ARCHITECTURES=${{ matrix.full_arch }} \ -DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-osx \ -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \ # EOF echo "::endgroup::" @@ -320,6 +322,7 @@ jobs: -GNinja \ -DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \ -DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ # EOF echo "::endgroup::" @@ -398,6 +401,7 @@ jobs: cmake .. \ -GNinja \ -DCMAKE_CXX_FLAGS="-fuse-ld=lld" \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ # EOF echo "::endgroup::" diff --git a/src/3rdparty/squirrel/squirrel/sqstate.cpp b/src/3rdparty/squirrel/squirrel/sqstate.cpp index 3adb4d8f9813a..a7fa192d88da8 100644 --- a/src/3rdparty/squirrel/squirrel/sqstate.cpp +++ b/src/3rdparty/squirrel/squirrel/sqstate.cpp @@ -3,8 +3,10 @@ */ #include "../../../stdafx.h" +#pragma message(XSTR(assert(true))) #include "sqpcheader.h" +#pragma message(XSTR(assert(true))) #include "sqopcodes.h" #include "sqvm.h" #include "sqfuncproto.h" diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index d6e1748f90d19..c6776b6a4e92b 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -8,7 +8,9 @@ /** @file order_cmd.cpp Handling of orders. */ #include "stdafx.h" +#pragma message(XSTR(assert(true))) #include "debug.h" +#pragma message(XSTR(assert(true))) #include "command_func.h" #include "company_func.h" #include "news_func.h" diff --git a/src/road.h b/src/road.h index c6a88e85524e3..b28076524eedf 100644 --- a/src/road.h +++ b/src/road.h @@ -10,14 +10,23 @@ #ifndef ROAD_H #define ROAD_H +#pragma message(XSTR(assert(true))) #include "road_type.h" +#pragma message(XSTR(assert(true))) #include "gfx_type.h" +#pragma message(XSTR(assert(true))) #include "core/bitmath_func.hpp" +#pragma message(XSTR(assert(true))) #include "strings_type.h" +#pragma message(XSTR(assert(true))) #include "timer/timer_game_calendar.h" +#pragma message(XSTR(assert(true))) #include "core/enum_type.hpp" +#pragma message(XSTR(assert(true))) #include "newgrf.h" +#pragma message(XSTR(assert(true))) #include "economy_func.h" +#pragma message(XSTR(assert(true))) enum RoadTramType : bool { diff --git a/src/stdafx.h b/src/stdafx.h index ab96be4e5ae00..93d9564a68022 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -394,6 +394,9 @@ void NORETURN AssertFailedError(int line, const char *file, const char *expressi # define assert(expression) if (unlikely(!(expression))) AssertFailedError(__LINE__, __FILE__, #expression); #endif +#define XSTR(x) STR(x) +#define STR(x) #x + /* Define JSON_ASSERT, which is used by nlohmann-json. Otherwise the header-file * will re-include assert.h, and reset the assert macro. */ #define JSON_ASSERT(x) assert(x) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 8a40d3d4571ab..ae58641a5ce4e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -8,7 +8,9 @@ /** @file town_cmd.cpp Handling of town tiles. */ #include "stdafx.h" +#pragma message(XSTR(assert(true))) #include "road.h" +#pragma message(XSTR(assert(true))) #include "road_internal.h" /* Cleaning up road bits */ #include "road_cmd.h" #include "landscape.h"