build(cmake): reject QGC_BUILD_TESTING on a non-Debug build - #15029
Open
julianoes wants to merge 1 commit into
Open
build(cmake): reject QGC_BUILD_TESTING on a non-Debug build#15029julianoes wants to merge 1 commit into
julianoes wants to merge 1 commit into
Conversation
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.
Contributor
|
See the Build Results workflow run for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Testing
Platforms Tested
Flight Stacks Tested
Screenshots
Checklist
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).