Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .evergreen/linker_tests_deps/app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.5)
cmake_minimum_required (VERSION 3.15...4.0)
project (app C)
add_executable (app app.c)
find_package (bson-1.0 1.11 REQUIRED)
message ("-- libbson found version \"${bson-1.0_VERSION}\"")
target_link_libraries (app PRIVATE mongo::bson_static)

find_package (mongocrypt REQUIRED)
target_link_libraries (app PRIVATE mongo::mongocrypt)
target_link_libraries (app PRIVATE mongo::mongocrypt)
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# ChangeLog

## 1.16.0 (Unreleased)

### Changed

- Set CMake minimum required version to `3.15...4.0` (with maximum policy version set to `4.0`).

## 1.15.0

### New features
Expand Down
13 changes: 1 addition & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
cmake_minimum_required (VERSION 3.12)

# Preempt the MSVC_RUNTIME_LIBRARY properties
if (POLICY CMP0091)
cmake_policy (SET CMP0091 NEW)
elseif (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
message (WARNING "The CMAKE_MSVC_RUNTIME_LIBRARY variable is set, but CMake is too old to understand it")
endif ()

if (POLICY CMP0135)
cmake_policy (SET CMP0135 NEW)
endif ()
cmake_minimum_required (VERSION 3.15...4.0)

project (mongocrypt C)

Expand Down
9 changes: 1 addition & 8 deletions cmake/MongoC-Warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,7 @@ function (mongoc_add_platform_compile_options)
endforeach ()
endfunction ()

if (CMAKE_VERSION VERSION_LESS 3.3)
# On older CMake versions, we'll just always pass the warning options, even
# if the generate warnings for the C++ check file
set (is_c_lang "1")
else ()
# $<COMPILE_LANGUAGE> is only valid in CMake 3.3+
set (is_c_lang "$<COMPILE_LANGUAGE:C>")
endif ()
set (is_c_lang "$<COMPILE_LANGUAGE:C>")

# These below warnings should always be unconditional hard errors, as the code is
# almost definitely broken
Expand Down
5 changes: 2 additions & 3 deletions kms-message/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.5)
cmake_minimum_required (VERSION 3.15...4.0)
project (kms_message
VERSION 0.0.1
LANGUAGES C
Expand All @@ -7,8 +7,7 @@ project (kms_message
set (CMAKE_C_STANDARD 99)

include (CheckCCompilerFlag)
# All targets obey visibility, not just library targets.
cmake_policy (SET CMP0063 NEW)

set (CMAKE_C_VISIBILITY_PRESET hidden)
set (KMS_MESSAGE_SOURCES
src/kms_b64.c
Expand Down