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 <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2024-11-06 13:43:49 +01:00
parent 774bfaa4cb
commit 0d0010fe58
+4
View File
@@ -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,
},