Skip to content

Commit dfa7118

Browse files
authored
[CMAKE] upgrade cmake minimum version to 3.16 (#3599)
1 parent 9d68c19 commit dfa7118

File tree

30 files changed

+34
-46
lines changed

30 files changed

+34
-46
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
runs-on: ubuntu-24.04
5959
env:
6060
CXX_STANDARD: '17'
61-
CMAKE_VERSION: '3.14.0'
61+
CMAKE_VERSION: '3.16.0'
6262
BUILD_TYPE: 'Debug'
6363
steps:
6464
- name: Harden the runner (Audit all outbound calls)

.github/workflows/cmake_install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
env:
154154
INSTALL_TEST_DIR: '/home/runner/install_test'
155155
# Set to the current minimum version of cmake
156-
CMAKE_VERSION: '3.14.0'
156+
CMAKE_VERSION: '3.16.0'
157157
# cxx14 is the default for Ubuntu 22.04
158158
CXX_STANDARD: '14'
159159
BUILD_TYPE: 'Debug'

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ Increment the:
3030
* [SDK] View should not have a unit
3131
[#3552](https://github.com/open-telemetry/opentelemetry-cpp/pull/3552)
3232

33+
Important changes:
34+
35+
* [CMAKE] Upgrade CMake minimum version to 3.16
36+
[#3599](https://github.com/open-telemetry/opentelemetry-cpp/pull/3599)
37+
3338
Breaking changes:
3439

3540
* [SDK] View should not have a unit

CMakeLists.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
cmake_minimum_required(VERSION 3.14)
5-
6-
# See https://cmake.org/cmake/help/latest/policy/CMP0074.html required by
7-
# certain version of zlib which CURL depends on.
8-
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12")
9-
cmake_policy(SET CMP0074 NEW)
10-
endif()
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-
17-
# Prefer CMAKE_MSVC_RUNTIME_LIBRARY if possible
18-
if(POLICY CMP0091)
19-
cmake_policy(SET CMP0091 NEW)
20-
endif()
4+
cmake_minimum_required(VERSION 3.16)
215

226
if(POLICY CMP0092)
237
# https://cmake.org/cmake/help/latest/policy/CMP0092.html#policy:CMP0092 Make

INSTALL.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ You can link OpenTelemetry C++ SDK with libraries provided in
2323
repository. To install Git, consult the [Set up
2424
Git](https://help.github.com/articles/set-up-git/) guide on GitHub.
2525
- [CMake](https://cmake.org/) for building opentelemetry-cpp API, SDK with their
26-
unittests. The minimum CMake version is 3.14.
27-
CMake 3.15+ is recommended on Windows due to known CI test failures with 3.14.
26+
unittests. The minimum CMake version is 3.16.
2827
To install CMake,
2928
consult the [Installing CMake](https://cmake.org/install/) guide.
3029
- [GoogleTest](https://github.com/google/googletest) framework to build and run

install/cmake/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# CMAKE_CXX_STANDARD: The C++ standard to use for all third-party packages.
2323
# Defaults to 14 if not set.
2424

25-
cmake_minimum_required(VERSION 3.14)
25+
cmake_minimum_required(VERSION 3.16)
2626
project(opentelemetry-cpp-thirdparty-install LANGUAGES CXX)
2727

2828
# Added in CMake 3.16. ExternalProject_Add() with GIT_SUBMODULES "" initializes

install/test/cmake/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
cmake_minimum_required(VERSION 3.14)
4+
cmake_minimum_required(VERSION 3.16)
55
project(opentelemetry-cpp-component-install-tests LANGUAGES CXX)
66

77
if(NOT INSTALL_TEST_CMAKE_OPTIONS)

install/test/cmake/component_tests/api/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
cmake_minimum_required(VERSION 3.14)
4+
cmake_minimum_required(VERSION 3.16)
55

66
project(opentelemetry-cpp-api-install-test LANGUAGES CXX)
77

install/test/cmake/component_tests/exporters_elasticsearch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
cmake_minimum_required(VERSION 3.14)
4+
cmake_minimum_required(VERSION 3.16)
55
project(opentelemetry-cpp-exporters-elasticsearch-install-test LANGUAGES CXX)
66

77
find_package(opentelemetry-cpp REQUIRED COMPONENTS exporters_elasticsearch)

install/test/cmake/component_tests/exporters_etw/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
cmake_minimum_required(VERSION 3.14)
4+
cmake_minimum_required(VERSION 3.16)
55
project(opentelemetry-cpp-exporters_etw-install-test LANGUAGES CXX)
66

77
find_package(opentelemetry-cpp REQUIRED COMPONENTS exporters_etw)

0 commit comments

Comments
 (0)