Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
aa99ce5a
Commit
aa99ce5a
authored
May 21, 2023
by
Shlomi Nissan
Browse files
Add CXX_STANDARD_REQUIRED to CMake quickstart
parent
cb455a71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
docs/quickstart-cmake.md
docs/quickstart-cmake.md
+1
-0
googletest/README.md
googletest/README.md
+4
-4
No files found.
docs/quickstart-cmake.md
View file @
aa99ce5a
...
...
@@ -54,6 +54,7 @@ project(my_project)
# GoogleTest requires at least C++14
set
(
CMAKE_CXX_STANDARD 14
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
include
(
FetchContent
)
FetchContent_Declare
(
...
...
googletest/README.md
View file @
aa99ce5a
...
...
@@ -126,10 +126,10 @@ match the project in which it is included.
An environment that supports C++11 is required in order to successfully build
GoogleTest. One way to ensure this is to specify the standard in the top-level
project, for example by using the
`set(CMAKE_CXX_STANDARD 11)`
command
. If this
is not feasible, for example in a C project using GoogleTest for validation,
then it can be specified by adding it to the options for cmake via the
`
DCMAKE_CXX_FLAGS`
option.
project, for example by using the
`set(CMAKE_CXX_STANDARD 11)`
command
along
with
`set(CMAKE_CXX_STANDARD_REQUIRED ON). If this is not feasible, for example
in a C project using GoogleTest for validation, then it can be specified by
adding it to the options for cmake via the `
-
DCMAKE_CXX_FLAGS
` option.
### Tweaking GoogleTest
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment