diff options
author | peter <peter_jiachen@163.com> | 2018-10-24 04:03:07 (GMT) |
---|---|---|
committer | peter <peter_jiachen@163.com> | 2018-10-24 04:03:07 (GMT) |
commit | 96824f11c6362baa4e061aaefd8eedd67c88bb9c (patch) | |
tree | 1136162d607c935577bc5b2f1b3599fca5f79220 /CMakeLists.txt | |
parent | 3bb00b7ead35ca3a9b5817ce1ab78050fe6be0e3 (diff) | |
download | googletest-96824f11c6362baa4e061aaefd8eedd67c88bb9c.zip googletest-96824f11c6362baa4e061aaefd8eedd67c88bb9c.tar.gz googletest-96824f11c6362baa4e061aaefd8eedd67c88bb9c.tar.bz2 |
Fix -std=c++11 flag
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 572dac0..e4c0971 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,10 @@ 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) |