diff options
author | Gennadiy Civil <misterg@google.com> | 2018-10-24 11:26:23 -0400 |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-10-24 11:26:24 -0400 |
commit | 6463ee81ae7ea8ee3dcaf341cb727d278f8cfe6b (patch) | |
tree | 37893f7536802687fe9efacf39a85f745b6056f6 | |
parent | 59f90a338bce2376b540ee239cf4e269bf6d68ad (diff) | |
parent | 478a518590901cf3da0868ae553c4ed7f7cf54e1 (diff) | |
download | googletest-6463ee81ae7ea8ee3dcaf341cb727d278f8cfe6b.tar.gz googletest-6463ee81ae7ea8ee3dcaf341cb727d278f8cfe6b.tar.bz2 googletest-6463ee81ae7ea8ee3dcaf341cb727d278f8cfe6b.zip |
Merge pull request #1890 from peterjc123:clang_fix
PiperOrigin-RevId: 218515152
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 572dac00..be14229e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,12 @@ 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) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) +endif() if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) |