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
96824f11
"git@developer.sourcefind.cn:yangql/googletest.git" did not exist on "39de88cb9cd43c46330bf20726e00e9b211f6ce9"
Unverified
Commit
96824f11
authored
Oct 24, 2018
by
peter
Browse files
Fix -std=c++11 flag
parent
3bb00b7e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
CMakeLists.txt
CMakeLists.txt
+6
-1
googletest/cmake/internal_utils.cmake
googletest/cmake/internal_utils.cmake
+4
-0
No files found.
CMakeLists.txt
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
)
...
...
googletest/cmake/internal_utils.cmake
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
)
...
...
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