Skip to content

Use link time optimization for CI release build #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 21, 2025
13 changes: 11 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@
},
{
"name": "ci-clang-release",
"inherits": "clang-release"
"inherits": "clang-release",
"cacheVariables": {
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "TRUE"
}
},
{
"name": "ci-gcc-debug",
Expand All @@ -270,7 +273,13 @@
"name": "ci-gcc-release",
"inherits": [
"gcc-release"
]
],
"cacheVariables": {
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "TRUE"
},
"environment": {
"ASAN_OPTIONS": "detect_odr_violation=0"
}
},
{
"name": "ci-sonar",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,13 @@ template <symmetry_tag sym> class MeasuredValues {
}

// process one object
static constexpr auto default_status_checker = [](auto x) -> bool { return x; };
struct DefaultStatusChecker {
template <class T> bool operator()(T x) const { return x; }
};

static constexpr DefaultStatusChecker default_status_checker{};

template <class TS, class StatusChecker = decltype(default_status_checker)>
template <class TS, class StatusChecker = DefaultStatusChecker>
static Idx process_one_object(Idx const object, grouped_idx_vector_type auto const& sensors_per_object,
std::vector<TS> const& object_status,
std::vector<PowerSensorCalcParam<sym>> const& input_data,
Expand Down
Loading