Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Googletest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Meng
Googletest
Commits
96824f11
Unverified
Commit
96824f11
authored
6 years ago
by
peter
Browse files
Options
Downloads
Patches
Plain Diff
Fix -std=c++11 flag
parent
3bb00b7e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+6
-1
6 additions, 1 deletion
CMakeLists.txt
googletest/cmake/internal_utils.cmake
+4
-0
4 additions, 0 deletions
googletest/cmake/internal_utils.cmake
with
10 additions
and
1 deletion
CMakeLists.txt
+
6
−
1
View file @
96824f11
cmake_minimum_required
(
VERSION 2.8.8
)
add_definitions
(
-std=c++11
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1"
)
add_definitions
(
-std=c++11
)
else
()
set
(
CMAKE_CXX_STANDARD 11
)
endif
()
if
(
POLICY CMP0048
)
cmake_policy
(
SET CMP0048 NEW
)
...
...
This diff is collapsed.
Click to expand it.
googletest/cmake/internal_utils.cmake
+
4
−
0
View file @
96824f11
...
...
@@ -98,6 +98,10 @@ macro(config_compiler_and_linker)
set
(
cxx_exception_flags
"-EHsc -D_HAS_EXCEPTIONS=1"
)
set
(
cxx_no_exception_flags
"-EHs-c- -D_HAS_EXCEPTIONS=0"
)
set
(
cxx_no_rtti_flags
"-GR-"
)
if
(
${
CMAKE_CXX_COMPILER_ID
}
STREQUAL
"Clang"
)
set
(
cxx_base_flags
"
${
cxx_base_flags
}
-Wno-unknown-argument"
)
endif
()
elseif
(
CMAKE_COMPILER_IS_GNUCXX
)
set
(
cxx_base_flags
"-Wall -Wshadow -Werror"
)
if
(
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment