Skip to content

Commit 6be5668

Browse files
authored
[CMake Examples] Update required CMake versions (#384)
1 parent 020867b commit 6be5668

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

drake_cmake_external/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# TODO(eric.cousineau): Link to documentation on superproject example pending
44
# resolution of: https://gitlab.kitware.com/cmake/cmake/issues/18336
55

6-
cmake_minimum_required(VERSION 3.16)
6+
# See https://drake.mit.edu/from_source.html for the versions of CMake
7+
# officially supported by Drake when building from source.
8+
cmake_minimum_required(VERSION 3.22...4.0)
79
project(drake_cmake_external)
810

911
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)

drake_cmake_installed/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# SPDX-License-Identifier: MIT-0
22

3-
cmake_minimum_required(VERSION 3.16)
3+
# Note that the minimum required version of CMake to consume a binary
4+
# installation of Drake is lower than the minimum required version
5+
# when building Drake from source (as seen in drake_cmake_external).
6+
# The maximum version below allows for the use of modern policies
7+
# with newer versions of CMake.
8+
cmake_minimum_required(VERSION 3.9...4.0)
49
project(drake_cmake_installed)
510

611
# N.B. This is a temporary flag. It only really applies to Linux, as Mac

drake_cmake_installed_apt/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# SPDX-License-Identifier: MIT-0
22

3-
cmake_minimum_required(VERSION 3.16)
3+
# Note that the minimum required version of CMake to consume a binary
4+
# installation of Drake is lower than the minimum required version
5+
# when building Drake from source (as seen in drake_cmake_external).
6+
# The maximum version below allows for the use of modern policies
7+
# with newer versions of CMake.
8+
cmake_minimum_required(VERSION 3.9...4.0)
49
project(drake_cmake_installed_apt)
510

611
include(CTest)

0 commit comments

Comments
 (0)