Skip to content

build(cmake): reject QGC_BUILD_TESTING on a non-Debug build - #15029

Open
julianoes wants to merge 1 commit into
masterfrom
fix-testing-requires-debug
Open

build(cmake): reject QGC_BUILD_TESTING on a non-Debug build#15029
julianoes wants to merge 1 commit into
masterfrom
fix-testing-requires-debug

Conversation

@julianoes

Copy link
Copy Markdown
Contributor

Description

Without this I got missing header MockLink.h. I don't fully understand this though, so feel free to ignore or address differently.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/Build changes
  • Other

Testing

  • Tested locally
  • Added/updated unit tests
  • Tested with simulator (SITL)
  • Tested with hardware

Platforms Tested

  • Linux
  • Windows
  • macOS
  • Android
  • iOS

Flight Stacks Tested

  • PX4
  • ArduPilot

Screenshots

Checklist

  • I have read the Contribution Guidelines
  • I have read the Code of Conduct
  • My code follows the project's coding standards
  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally

Related Issues


By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).

Every vehicle-level test links MockLink, which Comms/MockLink/CMakeLists.txt only
builds for Debug because its app-side entry points sit behind #ifdef QT_DEBUG.
Enabling testing on any other build type therefore compiles for thousands of
files before dying on a bare "MockLink.h: No such file or directory" from
VehicleTest.h, with nothing pointing at the actual cause.

The presets already pair testing with Debug exclusively, so this is only
reachable by passing -DQGC_BUILD_TESTING=ON on top of a non-Debug preset, which
is exactly what tools/configure.py --testing does.

Fail at configure time with a message naming both ways out. Multi-config
generators are left alone: CMAKE_BUILD_TYPE carries no answer there, and the
configuration is not chosen until build time.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ Build results unavailable — artifact download from one or more platform workflows failed
(likely artifact retention expiry or transient API error). The combined report cannot be generated for this run.

See the Build Results workflow run for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant