Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: do not print the default value of --c++-standard in help output #2447

Merged

Commits on Sep 20, 2024

  1. build: do not print the default value of --c++-standard in help output

    before this change, the output of `./configure.py --help` looks like:
    ```
      --c++-standard CPP_STANDARD
                            C++ standard to build with [default: ]
    ```
    
    because the default value of `--c++-standard` option is an empty string.
    printing out its value is not helpful, and could be confusing.
    
    as the actual default value of this option varies depending on the
    used compiler, so even if we print out the deduced C++ standard,
    it is still confusing. not to mention that argparse does not
    differentiate the defaulted value in the returned namespace from
    `parse_args()` from the user specified one. so, a simpler approach
    is just do not specify the default value.
    
    in this change, we
    
    * do not specify the default value for `--c++-standard`, so its
      value would be `None` if not specified
    * do not print its default value in the `--help` output
    
    Signed-off-by: Kefu Chai <[email protected]>
    tchaikov committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    80d2643 View commit details
    Browse the repository at this point in the history