ci: GCC 11 portability + BUNDLE DESTINATION "." on macOS

Linux (Rocky manylinux, GCC 11):

- WgpuAreaMeasurement.h: include <cstddef> directly. GCC 11 does not
  transitively pull `size_t` through <vector>, so triangleCount()'s
  return type fails to parse.

- WgpuViewportWindow.cpp:meshLocalToGlobal: use static_cast<double>(...)
  instead of double(mesh_local[N]) when constructing the Eigen::Vector4d.
  The latter triggers GCC 11's most-vexing-parse: it reads
  `Vector4d local(double(mesh_local[0]), double(mesh_local[1]), ...)`
  as a function declaration of `local` taking parameters
  `double mesh_local[0]` etc., colliding with the outer `mesh_local`
  parameter and failing with "redefinition of double* mesh_local".

macOS arm64:

- IfcViewerWgpuMinimal + BonsaiViewer install rules: change
  `BUNDLE DESTINATION bin` → `BUNDLE DESTINATION .`. Qt's deploy
  generator emits `macdeployqt <Target>.app` with no path prefix, which
  only resolves when the bundle sits at the install-prefix root.
  `BUNDLE DESTINATION bin` put it at `<prefix>/bin/Target.app` and the
  install/strip step failed with "Could not find app bundle".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-06-02 07:53:57 +10:00
parent 45e9f763c8
commit 938dda80d0
4 changed files with 18 additions and 10 deletions
+7 -3
View File
@@ -3136,9 +3136,13 @@ bool WgpuViewportWindow::meshLocalToGlobal(uint32_t object_id,
using Mat4dCol = Eigen::Matrix<double, 4, 4, Eigen::ColMajor>;
const Eigen::Matrix4d P =
Eigen::Map<const Mat4dCol>(inst.placement_transformation);
const Eigen::Vector4d local(double(mesh_local[0]),
double(mesh_local[1]),
double(mesh_local[2]),
// static_cast (not `double(...)`) to dodge GCC 11's most-vexing-parse:
// `Vector4d local(double(mesh_local[0]),…)` is otherwise read as a
// function declaration of `local` whose parameter is `double mesh_local[0]`,
// shadowing the outer `mesh_local` parameter.
const Eigen::Vector4d local(static_cast<double>(mesh_local[0]),
static_cast<double>(mesh_local[1]),
static_cast<double>(mesh_local[2]),
1.0);
const Eigen::Vector3d global =
(m.coordinate_operation_meters * P * local).head<3>();