Fix typo: MY_CXX_WARNING_FLGAS -> MY_CXX_WARNING_FLAGS in Cpp CMakeLists.txt - #4961
Open
arimu1 wants to merge 1 commit into
Open
Fix typo: MY_CXX_WARNING_FLGAS -> MY_CXX_WARNING_FLAGS in Cpp CMakeLists.txt#4961arimu1 wants to merge 1 commit into
arimu1 wants to merge 1 commit into
Conversation
…sts.txt Two set() calls for CMAKE_CXX_FLAGS_RELEASE (MSVC and non-MSVC branches) referenced the misspelled variable MY_CXX_WARNING_FLGAS instead of MY_CXX_WARNING_FLAGS. Since the misspelled variable was never defined, it expanded to nothing, silently dropping a redundant second copy of the warning flags (CMAKE_CXX_FLAGS already carries MY_CXX_WARNING_FLAGS via line 89, so warnings are still applied in Release builds). Fixes antlr#4864 Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com>
Author
|
C++ typo-only change ( Note: the red TypeScript build jobs look unrelated to this one-line CMake fix (cpp/java/js jobs green). Happy to dig if maintainers want, or they can ignore for this PR. |
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.
Fixes #4864.
What
runtime/Cpp/CMakeLists.txthas two occurrences of a misspelled variablereference,
MY_CXX_WARNING_FLGAS, in theCMAKE_CXX_FLAGS_RELEASElines(one in the MSVC branch, one in the non-MSVC branch). The correctly spelled
variable is
MY_CXX_WARNING_FLAGS.This PR corrects both occurrences to
MY_CXX_WARNING_FLAGS.Why this is purely cosmetic
Since
MY_CXX_WARNING_FLGASwas never defined, it silently expanded tonothing in the
set(CMAKE_CXX_FLAGS_RELEASE ...)lines — it did not cause abuild error. It also does not mean Release builds compile without
warning flags: line 89 (
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_WARNING_FLAGS}")) already appends the warning flags to the baseCMAKE_CXX_FLAGS, and CMake concatenatesCMAKE_CXX_FLAGSwith theper-config
CMAKE_CXX_FLAGS_<CONFIG>variable when invoking the compiler.So warning flags were already applied in Release builds through that path;
the typo only dropped a redundant second copy of the same flags being
appended a second time in the Release-specific line.
Notes
the same file (Debug, MinSizeRel, and RelWithDebInfo lines already use
MY_CXX_WARNING_FLAGScorrectly).observable behavior change.
reporter without merging (it appears to have been opened from a branch
literally named
dev, against this repo's contribution guidelines). Thetypo is still present on current
dev, so this PR supersedes it.