From 0d0010fe5841174925c367003a7c2d9f570dd705 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Wed, 6 Nov 2024 13:43:49 +0100 Subject: [PATCH] Fix non pch jenkins tests build on Windows With pch enabled WIN32 gets defined for cxxtests xmlformatter.h but not without resulting in a build failure ctime_r not found which was only added with C23. Explicitly define WIN32 for Windows target, to force the intended code path. Signed-off-by: Ralph Sennhauser --- build/premake/extern_libs5.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/premake/extern_libs5.lua b/build/premake/extern_libs5.lua index a12a792b5a..8bbf808912 100644 --- a/build/premake/extern_libs5.lua +++ b/build/premake/extern_libs5.lua @@ -260,6 +260,10 @@ extern_lib_defs = { else sysincludedirs { libraries_source_dir .. "cxxtest-4.4" } end + -- Upstream uses WIN32 instead of _WIN32 define + if os.istarget("windows") then + defines { "WIN32" } + end end end, },