1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-02-01 23:48:27 +00:00
Commit graph

10 commits

Author SHA1 Message Date
AnyOldName3
3512054da7 Merge branch 'ci-tweaks-2022-rebased-2026-plus-msbuild' into 'master'
CI tweaks 2022

See merge request OpenMW/openmw!5085
2026-01-23 00:07:09 +00:00
AnyOldName3
e68d4317c4 Get rid of unique PCHs from targets with three or fewer translation units
Precompiled headers avoid duplicate work.
If you've only got a single TU using a particular PCH, then there's no duplicate work, so it can only add overhead.

We don't need to totally abandon PCHs for these targets, though, as CMake lets us reuse the PCH from components.

If you've only got a few TUs in a target, it's *probably* faster to get components' PCH for free and eat the cost of it not being perfect than it is to make a perfect PCH from scratch.

Note that I don't know if there are drawbacks due to components having a couple of private precompiled headers that wouldn't have otherwise propagated or these targets having different build flags.
I can't test it locally right now as my linker's regained the deadlocking issue it had the other day.
If it turns out there are problems, then for the single-TU targets, simply avoiding using PCHs for them at all will still be an improvement over the status quo.
For the two-or-three TU targets, we'll have to actually measure things.
2026-01-15 17:44:32 +00:00
AnyOldName3
16efa6e5b5 Support long paths on Windows
Apparently we'd never bothered opting in, despite nearly everything in all out apps being entirely compatible and designed with long paths in mind.

GetModuleFileNameW is a bit awkward as it's just about the only Win32 function that returns the minimum of the buffer size and the string size - nearly everything else returns the full size even if it won't fit, so you can pass it a null pointer and a size of zero, and it'll tell you how much space you need to allocate.

I pretty much just copied the mostly-working long-path-friendly call site in the crash catcher to windowspath.cpp, but I also noticed that if the function failed and returned zero, the original implementation would loop forever, so I fixed that.

There was some code that could be ditched from the catch monitor as \\?\ is a prefix you can use to opt into long paths for a single API call instead of using the manifest to set it everywhere.
2026-01-07 15:12:22 +00:00
elsid
7c45a564a1
Fix clang-analyzer-deadcode.DeadStores 2025-04-05 12:55:17 +02:00
elsid
9b412bc802
Fix benchmark warning: -Wdeprecated-declarations
Example:

apps/benchmarks/settings/access.cpp: In function ‘void {anonymous}::localStatic(benchmark::State&)’:
apps/benchmarks/settings/access.cpp:43:37: warning: ‘typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type benchmark::DoNotOptimize(const Tp&) [with Tp = float; typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type = void]’ is deprecated: The const-ref version of this method can permit undesired compiler optimizations in benchmarks [-Wdeprecated-declarations]
   43 |             benchmark::DoNotOptimize(v);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~^~~
2024-03-16 01:58:12 +01:00
elsid
5859fd464c
Add option to disable precompiled headers
To be able to use ccache.

Also fix compilation errors appeared due to absence of precompiled
headers.
2024-03-08 02:11:51 +01:00
AnyOldName3
34fcfb63cf Eliminate redundant version checks 2023-07-20 00:43:56 +01:00
elsid
258ae9d98e
Add settings index to provide lookup by category and name 2023-05-03 22:11:44 +02:00
elsid
35f4bcd31e
Run openmw_settings_access_benchmark in CI
Add benchmarks to access 2 and 3 settings. Use settings with max memory address
distance assuming Settings::Values is single memory location object.

Use settings-default.cfg from the source code repository to initialize settings.
2023-04-24 22:30:49 +02:00
elsid
e5d5c51673
Add benchmarks for settings access 2023-03-28 20:47:34 +02:00