Skip to content

Commit

Permalink
Export of internal doc changes to Abseil OSS:
Browse files Browse the repository at this point in the history
rpc://team/absl-team/Abseil-Docs

Included changes:

651130137(Abseil Team):	Update CMake minimum version in docs to 3.16
647679030(shreck):	Mention shell expansion as a phase in command line parsing.

PiperOrigin-RevId: 651130137
Change-Id: Ieb814beb1e1c7543caa116ce99b98085447b42d4
  • Loading branch information
Abseil Team authored and manshreck committed Jul 25, 2024
1 parent 2712108 commit 03c20f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/cpp/guides/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@ Despite this flexibility, we recommend using only a single form:
`--variable=value` for non-boolean flags, and `--variable/--novariable` for
boolean flags. This consistency will make your code more readable.

Note that all command line flags are first parsed by the shell, which adheres to
the rules of [shell expansion][shell-expansions]. Specifically, quotes are
removed before passing any tokens off to the Flags Library. Care should be taken
to never use "smart" quotes in such command lines, as they will not parse
correctly.

For integer flag types (int32_t, int64_t, uint64_t, etc.), the following
formats are accepted:

Expand Down Expand Up @@ -653,3 +659,4 @@ std::string AbslUnparseFlag(const MyFlagType& flag) {
[friend-functions]: http://en.cppreference.com/w/cpp/language/friend
[time-library]: time.md#time-durations
[civiltime-library]: time.md#civil-times
[shell-expansions]: https://www.gnu.org/software/bash/manual/html_node/Shell-Expansions.html
2 changes: 1 addition & 1 deletion docs/cpp/quickstart-cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Note that we include an Abseil header file using the `absl` prefix.
Now, create a `CMakeLists.txt` file within your `examples` directory like the following:

```
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.16)
project(my_project)
Expand Down
2 changes: 1 addition & 1 deletion docs/cpp/tools/cmake-installs.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ the one we used in the
`find_package` to import Abseil's targets from our local `install` directory.

```
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.16)
project(my_project)
Expand Down

0 comments on commit 03c20f1

Please sign in to comment.