1
- cmake_minimum_required (VERSION 3.12)
2
-
3
- # Preempt the MSVC_RUNTIME_LIBRARY properties
4
- if (POLICY CMP0091)
5
- cmake_policy (SET CMP0091 NEW)
6
- elseif (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
7
- message (WARNING "The CMAKE_MSVC_RUNTIME_LIBRARY variable is set, but CMake is too old to understand it" )
8
- endif ()
9
-
10
- if (POLICY CMP0135)
11
- cmake_policy (SET CMP0135 NEW)
12
- endif ()
1
+ cmake_minimum_required (VERSION 3.15...4.0)
13
2
14
3
project (mongocrypt C)
15
4
@@ -27,20 +16,7 @@ option (ENABLE_BUILD_FOR_PPA "Maintainer-only option for preparing PPA build" OF
27
16
option (ENABLE_ONLINE_TESTS "Enable online tests and the csfle utility. Requires libmongoc." ON )
28
17
29
18
if (ENABLE_WINDOWS_STATIC_RUNTIME)
30
- if (POLICY CMP0091)
31
- # CMake 3.15 makes this trivial:
32
- set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
33
- else ()
34
- # Fix it up the old-fashioned way
35
- string (REPLACE "/MDd" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " )
36
- string (REPLACE "/MD" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} " )
37
- string (REPLACE "/MDd" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
38
- string (REPLACE "/MD" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} " )
39
- string (APPEND CMAKE_C_FLAGS_DEBUG " /MTd" )
40
- string (APPEND CMAKE_CXX_FLAGS_DEBUG " /MTd" )
41
- string (APPEND CMAKE_C_FLAGS_RELEASE " /MT" )
42
- string (APPEND CMAKE_CXX_FLAGS_RELEASE " /MT" )
43
- endif ()
19
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
44
20
endif ()
45
21
46
22
list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} /cmake)
0 commit comments