Skip to content

Commit d5e72ec

Browse files
authored
Merge branch 'main' into bugfix/ensure-daemon-waits-for-outstanding-futures
2 parents 1578273 + e5b457f commit d5e72ec

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

3rd-party/CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ if (MSVC)
44
add_compile_options(-wd5045) #Disable warning about Spectre mitigation
55
endif()
66

7+
function(add_subdirectory_compat)
8+
#
9+
# This is for CMake 4.0 compatibility.
10+
#
11+
# CMake 4.0 drops support CMake policies below 3.5 and some of our dependencies
12+
# declare their minimum required version as 3.4, and CMake 4.0 is not happy
13+
# with that. The CMAKE_POLICY_VERSION_MINIMUM option allows us to override that
14+
# without having to touch the dependency's source code.
15+
#
16+
# https://cmake.org/cmake/help/latest/variable/CMAKE_POLICY_VERSION_MINIMUM.html
17+
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
18+
add_subdirectory(${ARGV})
19+
endfunction()
20+
721
# Generates gRPC and protobuf C++ sources and headers from the given .proto files
822
#
923
# generate_grpc_cpp (<SRCS> <DEST> [<ARGN>...])
@@ -61,7 +75,7 @@ option(YAML_CPP_BUILD_TOOLS OFF)
6175
option(YAML_CPP_BUILD_CONTRIB OFF)
6276
option(YAML_CPP_BUILD_TESTS OFF)
6377

64-
add_subdirectory(yaml-cpp EXCLUDE_FROM_ALL)
78+
add_subdirectory_compat(yaml-cpp EXCLUDE_FROM_ALL)
6579
set_target_properties(yaml-cpp PROPERTIES POSITION_INDEPENDENT_CODE ON)
6680

6781
add_library(yaml INTERFACE)
@@ -94,7 +108,7 @@ target_compile_definitions(scope_guard INTERFACE
94108
SG_REQUIRE_NOEXCEPT_IN_CPP17)
95109

96110
# semver library
97-
add_subdirectory(semver EXCLUDE_FROM_ALL)
111+
add_subdirectory_compat(semver EXCLUDE_FROM_ALL)
98112
target_include_directories(semver INTERFACE
99113
${CMAKE_CURRENT_SOURCE_DIR}/semver/include)
100114
set_target_properties(semver PROPERTIES POSITION_INDEPENDENT_CODE ON)

include/multipass/network_interface_info.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include <algorithm>
2424
#include <string>
25+
#include <tuple>
2526
#include <vector>
2627

2728
namespace multipass

src/platform/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ endfunction()
4545
option(MULTIPASS_ENABLE_SYSLOG "Use syslog for logging instead of journald" OFF)
4646

4747
if(NOT MULTIPASS_ENABLE_SYSLOG)
48-
add_compile_definitions(-DMULTIPASS_JOURNALD_ENABLED)
48+
add_compile_definitions(MULTIPASS_JOURNALD_ENABLED)
4949
endif()
5050

5151
add_target(platform)

0 commit comments

Comments
 (0)