File tree Expand file tree Collapse file tree 4 files changed +15
-21
lines changed Expand file tree Collapse file tree 4 files changed +15
-21
lines changed Original file line number Diff line number Diff line change 1
1
project(gmock CXX C)
2
- cmake_minimum_required(VERSION 3.8 )
2
+ cmake_minimum_required(VERSION 3.15 )
3
3
4
4
find_package(gtest_vendor REQUIRED)
5
5
@@ -13,7 +13,7 @@ include_directories(
13
13
add_library(gmock STATIC
14
14
${gtest_vendor_BASE_DIR}/src/gtest-all.cc
15
15
src/gmock-all.cc)
16
- target_compile_features(gmock PUBLIC cxx_std_11 ) # Require C++11
16
+ target_compile_features(gmock PUBLIC cxx_std_14 ) # Require C++14
17
17
18
18
# When building with asan (i.e. using colcon build --mixin asan-gcc),
19
19
# asan itself provides a "fake" pthread that tricks the pthread
@@ -31,4 +31,4 @@ if(NOT WIN32)
31
31
endif()
32
32
33
33
add_library(gmock_main STATIC src/gmock_main.cc)
34
- target_compile_features(gmock_main PUBLIC cxx_std_11 ) # Require C++11
34
+ target_compile_features(gmock_main PUBLIC cxx_std_14 ) # Require C++14
Original file line number Diff line number Diff line change @@ -36,13 +36,11 @@ endif()
36
36
# as ${gmock_SOURCE_DIR} and to the root binary directory as
37
37
# ${gmock_BINARY_DIR}.
38
38
# Language "C" is required for find_package(Threads).
39
- if (CMAKE_VERSION VERSION_LESS 3.0)
40
- project(gmock CXX C)
41
- else()
42
- cmake_policy(SET CMP0048 NEW)
43
- project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
44
- endif()
45
- cmake_minimum_required(VERSION 2.8.12)
39
+
40
+ cmake_policy(SET CMP0048 NEW)
41
+ project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
42
+
43
+ cmake_minimum_required(VERSION 3.15)
46
44
47
45
if (COMMAND set_up_hermetic_build)
48
46
set_up_hermetic_build()
Original file line number Diff line number Diff line change 1
1
project(gtest CXX C)
2
- cmake_minimum_required(VERSION 3.8 )
2
+ cmake_minimum_required(VERSION 3.15 )
3
3
4
4
include_directories(
5
5
include
6
6
. # to find the source files included with "src/gtest*.cc"
7
7
)
8
8
9
9
add_library(gtest STATIC src/gtest-all.cc)
10
- target_compile_features(gtest PUBLIC cxx_std_11 ) # Require C++11
10
+ target_compile_features(gtest PUBLIC cxx_std_14 ) # Require C++14
11
11
12
12
# When building with asan (i.e. using colcon build --mixin asan-gcc),
13
13
# asan itself provides a "fake" pthread that tricks the pthread
@@ -25,4 +25,4 @@ if(NOT WIN32)
25
25
endif()
26
26
27
27
add_library(gtest_main STATIC src/gtest_main.cc)
28
- target_compile_features(gtest_main PUBLIC cxx_std_11 ) # Require C++11
28
+ target_compile_features(gtest_main PUBLIC cxx_std_14 ) # Require C++14
Original file line number Diff line number Diff line change @@ -46,14 +46,10 @@ endif()
46
46
47
47
# Project version:
48
48
49
- if (CMAKE_VERSION VERSION_LESS 3.0)
50
- project(gtest CXX C)
51
- set(PROJECT_VERSION ${GOOGLETEST_VERSION})
52
- else()
53
- cmake_policy(SET CMP0048 NEW)
54
- project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
55
- endif()
56
- cmake_minimum_required(VERSION 2.8.12)
49
+ cmake_policy(SET CMP0048 NEW)
50
+ project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
51
+
52
+ cmake_minimum_required(VERSION 3.15)
57
53
58
54
if (POLICY CMP0063) # Visibility
59
55
cmake_policy(SET CMP0063 NEW)
You can’t perform that action at this time.
0 commit comments