File tree 1 file changed +14
-7
lines changed
1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright The OpenTelemetry Authors
2
2
# SPDX-License-Identifier: Apache-2.0
3
3
4
- cmake_minimum_required (VERSION 3.9 )
4
+ cmake_minimum_required (VERSION 3.10 )
5
5
6
- # See https://cmake.org/cmake/help/v3.3/policy/CMP0057.html required by certain
7
- # versions of gtest
8
- cmake_policy (SET CMP0057 NEW)
9
-
10
- # See https://cmake.org/cmake/help/v3.12/policy/CMP0074.html required by certain
11
- # version of zlib which CURL depends on.
6
+ # See https://cmake.org/cmake/help/latest/policy/CMP0074.html required by
7
+ # certain version of zlib which CURL depends on.
12
8
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12" )
13
9
cmake_policy (SET CMP0074 NEW)
14
10
endif ()
15
11
12
+ # Allow to use normal variable for option()
13
+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13" )
14
+ cmake_policy (SET CMP0077 NEW)
15
+ endif ()
16
+
16
17
# Prefer CMAKE_MSVC_RUNTIME_LIBRARY if possible
17
18
if (POLICY CMP0091)
18
19
cmake_policy (SET CMP0091 NEW)
19
20
endif ()
20
21
22
+ # MSVC RTTI flag /GR should not be not added to CMAKE_CXX_FLAGS by default. @see
23
+ # https://cmake.org/cmake/help/latest/policy/CMP0117.html
24
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.20.0" )
25
+ cmake_policy (SET CMP0117 NEW)
26
+ endif ()
27
+
21
28
project (opentelemetry-cpp)
22
29
23
30
# Mark variables as used so cmake doesn't complain about them
You can’t perform that action at this time.
0 commit comments