Update cxxopts to v3.3.1 - #132
Open
vishesh9131 wants to merge 1 commit into
Open
vishesh9131 wants to merge 1 commit into
vishesh9131 wants to merge 1 commit into
Conversation
cxxopts v2.2.0 declares cmake_minimum_required(VERSION 3.1). CMake 4 removed compatibility with versions older than 3.5, so configuring the project fails unless CMAKE_POLICY_VERSION_MINIMUM is set. v3.3.1 declares 3.5...3.19 and needs no source changes in the image captioning tutorial.
Owner
|
why didn't the CI catch it? anyway we can handle this on CI side as well? |
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 of the change
Configuring the project with CMake 4.x fails inside
extern/cxxopts:cxxopts v2.2.0 declares
cmake_minimum_required(VERSION 3.1). This updates it to v3.3.1 (the latest release, which declares3.5...3.19), so the project configures on CMake 4 without passing-DCMAKE_POLICY_VERSION_MINIMUM=3.5. TheCXXOPTS_BUILD_EXAMPLES,CXXOPTS_BUILD_TESTSandCXXOPTS_ENABLE_INSTALLoptions set inextern/CMakeLists.txtstill exist in v3.3.1.Only the image captioning tutorial uses cxxopts, and it needs no source changes (v3's
Options::parsetakesconst char* const*, whichchar**converts to).Testing (CMake 4.4.3, GCC 11.4, Ubuntu 22.04, libtorch 2.10.0): configuring with
DOWNLOAD_DATASETS=OFFand buildingimage-captioningsucceed without the policy flag. I compared the old and new binaries:--helpVocabulary size: 4076Vocabulary size: 4076--min_word_frequency=5 --batch_size=8 --validate_on_epoch_end=falseVocabulary size: 2985Vocabulary size: 2985option_not_exists_exception/argument_incorrect_typeexceptions::no_such_option/exceptions::incorrect_argument_typeType Of Change
Related Issues
Development & Code Review
cmake -P cpplint.cmake)