зеркало из https://github.com/microsoft/STL.git
CMakeLists.txt: Check the Windows SDK version (#2729)
This commit is contained in:
Родитель
296681379d
Коммит
dae60920e9
|
@ -5,6 +5,16 @@ cmake_minimum_required(VERSION 3.22)
|
|||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
project(msvc_standard_libraries LANGUAGES CXX)
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles([=[
|
||||
#include <sdkddkver.h>
|
||||
static_assert(WDK_NTDDI_VERSION >= NTDDI_WIN10_CO, "Inspecting WDK_NTDDI_VERSION, the Windows SDK version.");
|
||||
int main() {}
|
||||
]=] WINDOWS_SDK_VERSION_CHECK)
|
||||
if(NOT WINDOWS_SDK_VERSION_CHECK)
|
||||
message(FATAL_ERROR "The STL must be built with the Windows 11 SDK (10.0.22000.0) or later. Make sure it's available by selecting it in the Individual Components tab of the VS Installer.")
|
||||
endif()
|
||||
|
||||
# add the tools subdirectory _before_ we change all the flags
|
||||
add_subdirectory(tools EXCLUDE_FROM_ALL)
|
||||
# these allow the targets to show up in the top-level
|
||||
|
|
Загрузка…
Ссылка в новой задаче