fix(cmake): fix LOWERCASE_BUILD_TYPE definition and usage#180
Merged
zjw1111 merged 1 commit intoalibaba:mainfrom Mar 16, 2026
Merged
fix(cmake): fix LOWERCASE_BUILD_TYPE definition and usage#180zjw1111 merged 1 commit intoalibaba:mainfrom
zjw1111 merged 1 commit intoalibaba:mainfrom
Conversation
This commit fixes several issues with CMAKE_BUILD_TYPE_LOWER variable: 1. Duplicate definitions: The variable was defined twice in the file - Line 1094 in Arrow build section - Line 1315 in TBB build section 2. Use-before-definition bug: In TBB section, line 1304 used the variable before it was defined on line 1315 3. Inconsistent naming: Renamed CMAKE_BUILD_TYPE_LOWER to LOWERCASE_BUILD_TYPE to match the naming style of UPPERCASE_BUILD_TYPE The fix consolidates the definition at the top of the file (line 33), right after UPPERCASE_BUILD_TYPE, ensuring it's available throughout the file and following a consistent naming convention. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes inconsistent and incorrect handling of the lowercased build type in ThirdpartyToolchain.cmake by introducing a single, consistently named LOWERCASE_BUILD_TYPE variable and updating all relevant references.
Changes:
- Define
LOWERCASE_BUILD_TYPEonce near the top ofThirdpartyToolchain.cmake. - Remove duplicate
CMAKE_BUILD_TYPE_LOWERdefinitions in the Arrow and TBB sections. - Replace
CMAKE_BUILD_TYPE_LOWERusages withLOWERCASE_BUILD_TYPEin Arrow/GTest/TBB logic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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.
This commit fixes several issues with the CMAKE_BUILD_TYPE_LOWER variable in ThirdpartyToolchain.cmake:
Duplicate definitions
Use-before-definition bug
Inconsistent naming
The fix consolidates the definition at the top of the file (line 33), right after UPPERCASE_BUILD_TYPE, and renames it to LOWERCASE_BUILD_TYPE for consistency.
Changes:
Affected build macros: build_arrow(), build_gtest(), build_tbb()