Skip to content

Commit 3d6cec5

Browse files
committed
[#82] Unify CMake minimum version 3.15 across build system
1 parent 455b59c commit 3d6cec5

File tree

12 files changed

+22
-13
lines changed

12 files changed

+22
-13
lines changed

cmake/clang_format_tool.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Script called from clang_format_utils.cmake to run clang-format and preserve it's output.
22
#
3+
# Prerequisites:
4+
# CMake 3.15+
5+
#
36
# Expected definitions:
47
# CLANG_FORMAT_BIN Clang format binary.
58
# SOURCE Source to check by clang-format.
69
# CONFIG_FILE Path to the clang-format config file.
710
# WERROR Ends with an error in case of any format violation.
8-
cmake_minimum_required(VERSION 3.6.0)
11+
cmake_minimum_required(VERSION 3.15.0)
912

1013
foreach (ARG CLANG_FORMAT_BIN SOURCE CONFIG_FILE WERROR)
1114
if (NOT DEFINED ${ARG})

cmake/clang_tidy_check.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Script called from clang_tidy_utils.cmake to run checks for unexpected warnings.
22
#
3+
# Prerequisites:
4+
# CMake 3.15+
5+
#
36
# Expected definitions:
47
# LOG_FILE File containing clang-tidy log.
58
# SUPPRESSIONS_FILE Suppressions file for clang-tidy warnings. If any warnings are fired but not suppressed,
@@ -12,7 +15,7 @@
1215
# WERROR Ends with an error in case of any unsuppressed clang-tidy warnings.
1316
# WERROR_UNUSED_SUPPRESSIONS
1417
# Fires an error in case of unused suppressions.
15-
cmake_minimum_required(VERSION 3.6.0)
18+
cmake_minimum_required(VERSION 3.15.0)
1619

1720
# splits suppression to RULE and PATH_MATCHER parts
1821
function(get_matchers SUPPRESSION RULE_VAR PATH_MATCHER_VAR)

cmake/clang_tidy_tool.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Script called from clang_tidy_utils.cmake to run clang-tidy and preserve it's output.
22
#
3+
# Prerequisites:
4+
# CMake 3.15+
5+
#
36
# Expected definitions:
47
# CLANG_TIDY_BIN Clang Tidy binary.
58
# SOURCES Sources to check by clang-tidy.
69
# BUILD_PATH Build path containing compilation database. Use -DCMAKE_EXPORT_COMPILE_COMMANDS=ON.
710
# CONFIG_FILE Path to the clang-tidy config file.
811
# HEADER_FILTER Header filter to use.
912
# OUTPUT_FILE Output file to use.
10-
cmake_minimum_required(VERSION 3.6.0)
13+
cmake_minimum_required(VERSION 3.15.0)
1114

1215
separate_arguments(SOURCES)
1316

cmake/zserio_compiler.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@
6969
# - ZSERIO_JAR_FILE is changed
7070
# - zserio schema sources are changed
7171
# - EXTRA_ARGS are changed
72+
73+
if (CMAKE_VERSION VERSION_LESS "3.15.0")
74+
message(FATAL_ERROR "CMake 3.15+ is required!")
75+
endif ()
76+
7277
function(zserio_generate_cpp)
7378
find_program(JAVA java)
7479
if (NOT JAVA)

compiler/extensions/cpp/runtime/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This CMake file is designed to be included directly without any further dependencies.
77
#
88

9-
cmake_minimum_required(VERSION 3.9.0)
9+
cmake_minimum_required(VERSION 3.15.0)
1010

1111
project(ZserioCppRuntimeTests)
1212

compiler/extensions/cpp/runtime/src/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# add_executable(ZserioTestApp HelloWorld.cpp)
1414
# target_link_libraries(ZserioTestApp ZserioCppRuntime)
1515

16-
cmake_minimum_required(VERSION 3.1.0)
16+
cmake_minimum_required(VERSION 3.15.0)
1717

1818
project(ZserioCppRuntime)
1919

compiler/extensions/cpp/runtime/test/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# This CMake file is NOT designed to be included directly without any further dependencies.
66
#
77

8-
cmake_minimum_required(VERSION 3.9.0)
9-
108
project(ZserioCppRuntimeTest)
119

1210
# add gtest library

compiler/extensions/cpp/runtime/test/zserio/deprecated_attribute/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
cmake_minimum_required(VERSION 3.6.0)
2-
31
include(ExternalProject)
42

53
ExternalProject_add(DeprecatedAttribute

compiler/extensions/cpp/runtime/test/zserio/deprecated_attribute/src/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.6.0)
1+
cmake_minimum_required(VERSION 3.15.0)
22

33
project(DeprecatedAttribute)
44

scripts/test_perf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ generate_cpp_files()
276276
local BUILD_SRC_DIR="${BUILD_DIR}/src"
277277
mkdir -p "${BUILD_SRC_DIR}"
278278
cat > "${BUILD_SRC_DIR}"/CMakeLists.txt << EOF
279-
cmake_minimum_required(VERSION 3.6.0)
279+
cmake_minimum_required(VERSION 3.15.0)
280280
project(PerformanceTest)
281281
282282
enable_testing()

scripts/test_zs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ compiler_set_warnings_as_errors()"
201201
fi
202202

203203
cat > ${BUILD_DIR}/CMakeLists.txt << EOF
204-
cmake_minimum_required(VERSION 3.6.0)
204+
cmake_minimum_required(VERSION 3.15.0)
205205
project(test_zs_${TEST_NAME})
206206
207207
enable_testing()

test/utils/cpp/test_utils/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# This CMake file defines utility library which is used for all C++ integration tests.
44
#
5-
cmake_minimum_required(VERSION 3.6.0)
65

76
project(ZserioCppTestUtils)
87

0 commit comments

Comments
 (0)