Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
131878ce
Commit
131878ce
authored
Apr 11, 2020
by
Olivier Ldff
Committed by
Olivier LDff
Jul 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use target_compile_features to use c++11 if cmake > 3.8
If target_compile_features is available and cxx_std_11. This fix compilation with clang and gcc when c++11 isn't specified by user.
parent
aee0f9d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
internal_utils.cmake
googletest/cmake/internal_utils.cmake
+4
-0
No files found.
googletest/cmake/internal_utils.cmake
View file @
131878ce
...
@@ -188,6 +188,10 @@ function(cxx_library_with_type name type cxx_flags)
...
@@ -188,6 +188,10 @@ function(cxx_library_with_type name type cxx_flags)
endif
()
endif
()
target_link_libraries
(
${
name
}
PUBLIC
${
threads_spec
}
)
target_link_libraries
(
${
name
}
PUBLIC
${
threads_spec
}
)
endif
()
endif
()
if
(
NOT
"
${
CMAKE_VERSION
}
"
VERSION_LESS
"3.8"
)
target_compile_features
(
${
name
}
PUBLIC cxx_std_11
)
endif
()
endfunction
()
endfunction
()
########################################################################
########################################################################
...
...
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