summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineSystem.cmake1
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake6
-rw-r--r--Modules/ExternalProject.cmake17
-rw-r--r--Modules/FetchContent.cmake13
-rw-r--r--Modules/FindGLUT.cmake18
-rw-r--r--Modules/FindOpenCL.cmake2
-rw-r--r--Modules/FindPkgConfig.cmake4
-rw-r--r--Modules/FindPython/Support.cmake2
-rw-r--r--Modules/FindPythonInterp.cmake2
-rw-r--r--Modules/FindPythonLibs.cmake2
-rw-r--r--Modules/FindVulkan.cmake566
-rw-r--r--Modules/FindZLIB.cmake22
-rw-r--r--Modules/FortranCInterface/CMakeLists.txt3
-rw-r--r--Modules/Internal/CPack/CPackNuGet.cmake4
-rw-r--r--Modules/Platform/Windows-Clang.cmake2
15 files changed, 589 insertions, 75 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index 8c7af06..2c2c2ac 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -128,7 +128,6 @@ if(CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "${_INCLUDED_TOOLCHAIN_FILE}" CACHE FILEPATH "The CMake toolchain file" FORCE)
else()
message(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
- set(CMAKE_TOOLCHAIN_FILE "NOTFOUND" CACHE FILEPATH "The CMake toolchain file" FORCE)
endif()
endif()
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index 5813956..6f5702a 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -177,9 +177,9 @@ macro.
packages with no binaries.
.. versionadded:: 3.19
- ``COMPATIBILITY_MODE`` ``AnyNewerVersion``, ``SameMajorVersion`` and
- ``SameMinorVersion`` handle the version range if any is specified
- (see :command:`find_package` command for the details).
+ The version file generated by ``AnyNewerVersion``, ``SameMajorVersion`` and
+ ``SameMinorVersion`` arguments of ``COMPATIBILITY`` handle the version range
+ if any is specified (see :command:`find_package` command for the details).
``ExactVersion`` mode is incompatible with version ranges and will display an
author warning if one is specified.
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 5c37be2..707de88 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2530,6 +2530,12 @@ function(_ep_add_download_command name)
get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
+ get_property(uses_terminal TARGET ${name} PROPERTY _EP_USES_TERMINAL_DOWNLOAD)
+ if(uses_terminal)
+ set(svn_interactive_args "")
+ else()
+ set(svn_interactive_args "--non-interactive")
+ endif()
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
@@ -2545,7 +2551,8 @@ function(_ep_add_download_command name)
set(svn_trust_cert_args --trust-server-cert)
endif()
set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}
- --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name})
+ ${svn_interactive_args} ${svn_trust_cert_args} ${svn_user_pw_args}
+ ${src_name})
elseif(git_repository)
set(method git)
@@ -2934,6 +2941,12 @@ function(_ep_add_update_command name)
get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
+ get_property(uses_terminal TARGET ${name} PROPERTY _EP_USES_TERMINAL_UPDATE)
+ if(uses_terminal)
+ set(svn_interactive_args "")
+ else()
+ set(svn_interactive_args "--non-interactive")
+ endif()
set(svn_user_pw_args "")
if(DEFINED svn_username)
set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
@@ -2945,7 +2958,7 @@ function(_ep_add_update_command name)
set(svn_trust_cert_args --trust-server-cert)
endif()
set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision}
- --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args})
+ ${svn_interactive_args} ${svn_trust_cert_args} ${svn_user_pw_args})
set(always 1)
elseif(git_repository)
# FetchContent gives us these directly, so don't try to recompute them
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index 1b81778..a342aa7 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -1351,6 +1351,14 @@ ExternalProject_Add_Step(${contentName}-populate copyfile
list(APPEND subCMakeOpts "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}")
endif()
+ # Override the sub-build's configuration types for multi-config generators.
+ # This ensures we are not affected by any custom setting from the project
+ # and can always request a known configuration further below.
+ get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if(is_multi_config)
+ list(APPEND subCMakeOpts "-DCMAKE_CONFIGURATION_TYPES:STRING=Debug")
+ endif()
+
else()
# Likely we've been invoked via CMake's script mode where no
# generator is set (and hence CMAKE_MAKE_PROGRAM could not be
@@ -1395,7 +1403,8 @@ set_property(GLOBAL PROPERTY _CMAKE_FindGit_GIT_EXECUTABLE_VERSION
# If we've already previously done these steps, they will not cause
# anything to be updated, so extra rebuilds of the project won't occur.
# Make sure to pass through CMAKE_MAKE_PROGRAM in case the main project
- # has this set to something not findable on the PATH.
+ # has this set to something not findable on the PATH. We also ensured above
+ # that the Debug config will be defined for multi-config generators.
configure_file("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/FetchContent/CMakeLists.cmake.in"
"${ARG_SUBBUILD_DIR}/CMakeLists.txt")
execute_process(
@@ -1411,7 +1420,7 @@ set_property(GLOBAL PROPERTY _CMAKE_FindGit_GIT_EXECUTABLE_VERSION
message(FATAL_ERROR "CMake step for ${contentName} failed: ${result}")
endif()
execute_process(
- COMMAND ${CMAKE_COMMAND} --build .
+ COMMAND ${CMAKE_COMMAND} --build . --config Debug
RESULT_VARIABLE result
${outputOptions}
WORKING_DIRECTORY "${ARG_SUBBUILD_DIR}"
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 43041c5..320ddad 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -96,7 +96,21 @@ endfunction()
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
+ # Tell pkg-config not to strip any -I flags to make sure GLUT_INCLUDE_DIRS
+ # will be defined.
+ if(DEFINED ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS})
+ set(_pkgconfig_allow_system_cflags_old "$ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS}")
+ else()
+ unset(_pkgconfig_allow_system_cflags_old)
+ endif()
+ set(ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS} 1)
pkg_check_modules(GLUT QUIET glut)
+ if(DEFINED _pkgconfig_allow_system_cflags_old)
+ set(ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS} "${_pkgconfig_allow_system_cflags_old}")
+ unset(_pkgconfig_allow_system_cflags_old)
+ else()
+ unset(ENV{PKG_CONFIG_ALLOW_SYSTEM_CFLAGS})
+ endif()
if(NOT GLUT_FOUND)
pkg_check_modules(GLUT QUIET freeglut)
endif()
@@ -261,8 +275,4 @@ if (GLUT_FOUND)
PROPERTY INTERFACE_LINK_LIBRARIES GLUT::Cocoa)
endif()
endif()
-
- #The following deprecated settings are for backwards compatibility with CMake1.4
- set (GLUT_LIBRARY ${GLUT_LIBRARIES})
- set (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIRS})
endif()
diff --git a/Modules/FindOpenCL.cmake b/Modules/FindOpenCL.cmake
index 1b4662b..5c7aa22 100644
--- a/Modules/FindOpenCL.cmake
+++ b/Modules/FindOpenCL.cmake
@@ -45,7 +45,7 @@ function(_FIND_OPENCL_VERSION)
set(CMAKE_REQUIRED_QUIET ${OpenCL_FIND_QUIETLY})
CMAKE_PUSH_CHECK_STATE()
- foreach(VERSION "2_2" "2_1" "2_0" "1_2" "1_1" "1_0")
+ foreach(VERSION "3_0" "2_2" "2_1" "2_0" "1_2" "1_1" "1_0")
set(CMAKE_REQUIRED_INCLUDES "${OpenCL_INCLUDE_DIR}")
if(APPLE)
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 844ea25..854e0e1 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -467,7 +467,7 @@ macro(_pkg_set_path_internal)
else()
unset(_pkgconfig_allow_system_libs_old)
endif()
- set(ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS} 0)
+ set(ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS} 1)
endmacro()
macro(_pkg_restore_path_internal)
@@ -478,6 +478,8 @@ macro(_pkg_restore_path_internal)
if(DEFINED _pkgconfig_allow_system_libs_old)
set(ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS} "${_pkgconfig_allow_system_libs_old}")
unset(_pkgconfig_allow_system_libs_old)
+ else()
+ unset(ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS})
endif()
unset(_extra_paths)
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 6edfbea..cbb6c1c 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -22,7 +22,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
endif()
if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "3")
- set(_${_PYTHON_PREFIX}_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+ set(_${_PYTHON_PREFIX}_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "2")
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
else()
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 4fc40c8..7ad3587 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -54,7 +54,7 @@ unset(_Python_NAMES)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
-set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(PythonInterp_FIND_VERSION)
if(PythonInterp_FIND_VERSION_COUNT GREATER 1)
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index c0caf34..43a84dd 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -79,7 +79,7 @@ set(CMAKE_FIND_FRAMEWORK LAST)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
-set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(PythonLibs_FIND_VERSION)
if(PythonLibs_FIND_VERSION_COUNT GREATER 1)
diff --git a/Modules/FindVulkan.cmake b/Modules/FindVulkan.cmake
index 527ca8b..7a32c2f 100644
--- a/Modules/FindVulkan.cmake
+++ b/Modules/FindVulkan.cmake
@@ -10,6 +10,15 @@ FindVulkan
Find Vulkan, which is a low-overhead, cross-platform 3D graphics
and computing API.
+Optional COMPONENTS
+^^^^^^^^^^^^^^^^^^^
+
+.. versionadded:: 3.24
+
+This module respects several optional COMPONENTS: ``glslc``,
+``glslangValidator``, ``glslang``, ``shaderc_combined`` and ``SPIRV-Tools``.
+There are corresponding import targets for each of these flags.
+
IMPORTED Targets
^^^^^^^^^^^^^^^^
@@ -36,6 +45,24 @@ This module defines :prop_tgt:`IMPORTED` targets if Vulkan has been found:
The glslangValidator tool, if found. It is used to compile GLSL and
HLSL shaders into SPIR-V.
+``Vulkan::glslang``
+ .. versionadded:: 3.24
+
+ Defined if SDK has the Khronos-reference front-end shader parser and SPIR-V
+ generator library (glslang).
+
+``Vulkan::shaderc_combined``
+ .. versionadded:: 3.24
+
+ Defined if SDK has the Google static library for Vulkan shader compilation
+ (shaderc_combined).
+
+``Vulkan::SPIRV-Tools``
+ .. versionadded:: 3.24
+
+ Defined if SDK has the Khronos library to process SPIR-V modules
+ (SPIRV-Tools).
+
Result Variables
^^^^^^^^^^^^^^^^
@@ -51,6 +78,26 @@ This module defines the following variables:
.. versionadded:: 3.23
value from ``vulkan/vulkan_core.h``
+``Vulkan_glslc_FOUND``
+ .. versionadded:: 3.24
+
+ True, if the SDK has the glslc executable.
+``Vulkan_glslangValidator_FOUND``
+ .. versionadded:: 3.24
+
+ True, if the SDK has the glslangValidator executable.
+``Vulkan_glslang_FOUND``
+ .. versionadded:: 3.24
+
+ True, if the SDK has the glslang library.
+``Vulkan_shaderc_combined_FOUND``
+ .. versionadded:: 3.24
+
+ True, if the SDK has the shaderc_combined library.
+``Vulkan_SPIRV-Tools_FOUND``
+ .. versionadded:: 3.24
+
+ True, if the SDK has the SPIRV-Tools library.
The module will also defines these cache variables:
@@ -62,6 +109,18 @@ The module will also defines these cache variables:
the path to the GLSL SPIR-V compiler
``Vulkan_GLSLANG_VALIDATOR_EXECUTABLE``
the path to the glslangValidator tool
+``Vulkan_glslang_LIBRARY``
+ .. versionadded:: 3.24
+
+ Path to the glslang library.
+``Vulkan_shaderc_combined_LIBRARY``
+ .. versionadded:: 3.24
+
+ Path to the shaderc_combined library.
+``Vulkan_SPIRV-Tools_LIBRARY``
+ .. versionadded:: 3.24
+
+ Path to the SPIRV-Tools library.
Hints
^^^^^
@@ -76,63 +135,258 @@ environment.
#]=======================================================================]
-if(WIN32)
- find_path(Vulkan_INCLUDE_DIR
- NAMES vulkan/vulkan.h
- HINTS
- "$ENV{VULKAN_SDK}/Include"
- )
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW)
+# For backward compatibility as `FindVulkan` in previous CMake versions allow to retrieve `glslc`
+# and `glslangValidator` without requesting the corresponding component.
+if(NOT glslc IN_LIST Vulkan_FIND_COMPONENTS)
+ list(APPEND Vulkan_FIND_COMPONENTS glslc)
+endif()
+if(NOT glslangValidator IN_LIST Vulkan_FIND_COMPONENTS)
+ list(APPEND Vulkan_FIND_COMPONENTS glslangValidator)
+endif()
+
+if(WIN32)
+ set(_Vulkan_library_name vulkan-1)
+ set(_Vulkan_hint_include_search_paths
+ "$ENV{VULKAN_SDK}/Include"
+ )
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- find_library(Vulkan_LIBRARY
- NAMES vulkan-1
- HINTS
- "$ENV{VULKAN_SDK}/Lib"
- "$ENV{VULKAN_SDK}/Bin"
- )
- find_program(Vulkan_GLSLC_EXECUTABLE
- NAMES glslc
- HINTS
- "$ENV{VULKAN_SDK}/Bin"
- )
- find_program(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE
- NAMES glslangValidator
- HINTS
- "$ENV{VULKAN_SDK}/Bin"
- )
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
- find_library(Vulkan_LIBRARY
- NAMES vulkan-1
- HINTS
- "$ENV{VULKAN_SDK}/Lib32"
- "$ENV{VULKAN_SDK}/Bin32"
- )
- find_program(Vulkan_GLSLC_EXECUTABLE
- NAMES glslc
- HINTS
- "$ENV{VULKAN_SDK}/Bin32"
- )
- find_program(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE
- NAMES glslangValidator
- HINTS
- "$ENV{VULKAN_SDK}/Bin32"
- )
+ set(_Vulkan_hint_executable_search_paths
+ "$ENV{VULKAN_SDK}/Bin"
+ )
+ set(_Vulkan_hint_library_search_paths
+ "$ENV{VULKAN_SDK}/Lib"
+ "$ENV{VULKAN_SDK}/Bin"
+ )
+ else()
+ set(_Vulkan_hint_executable_search_paths
+ "$ENV{VULKAN_SDK}/Bin32"
+ )
+ set(_Vulkan_hint_library_search_paths
+ "$ENV{VULKAN_SDK}/Lib32"
+ "$ENV{VULKAN_SDK}/Bin32"
+ )
endif()
else()
- find_path(Vulkan_INCLUDE_DIR
- NAMES vulkan/vulkan.h
- HINTS "$ENV{VULKAN_SDK}/include")
- find_library(Vulkan_LIBRARY
- NAMES vulkan
- HINTS "$ENV{VULKAN_SDK}/lib")
+ set(_Vulkan_library_name vulkan)
+ set(_Vulkan_hint_include_search_paths
+ "$ENV{VULKAN_SDK}/include"
+ )
+ set(_Vulkan_hint_executable_search_paths
+ "$ENV{VULKAN_SDK}/bin"
+ )
+ set(_Vulkan_hint_library_search_paths
+ "$ENV{VULKAN_SDK}/lib"
+ )
+endif()
+
+find_path(Vulkan_INCLUDE_DIR
+ NAMES vulkan/vulkan.h
+ HINTS
+ ${_Vulkan_hint_include_search_paths}
+ )
+mark_as_advanced(Vulkan_INCLUDE_DIR)
+
+find_library(Vulkan_LIBRARY
+ NAMES ${_Vulkan_library_name}
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+mark_as_advanced(Vulkan_LIBRARY)
+
+if(glslc IN_LIST Vulkan_FIND_COMPONENTS)
find_program(Vulkan_GLSLC_EXECUTABLE
NAMES glslc
- HINTS "$ENV{VULKAN_SDK}/bin")
+ HINTS
+ ${_Vulkan_hint_executable_search_paths}
+ )
+ mark_as_advanced(Vulkan_GLSLC_EXECUTABLE)
+endif()
+if(glslangValidator IN_LIST Vulkan_FIND_COMPONENTS)
find_program(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE
NAMES glslangValidator
- HINTS "$ENV{VULKAN_SDK}/bin")
+ HINTS
+ ${_Vulkan_hint_executable_search_paths}
+ )
+ mark_as_advanced(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE)
+endif()
+if(glslang IN_LIST Vulkan_FIND_COMPONENTS)
+ find_library(Vulkan_glslang-spirv_LIBRARY
+ NAMES SPIRV
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-spirv_LIBRARY)
+
+ find_library(Vulkan_glslang-spirv_DEBUG_LIBRARY
+ NAMES SPIRVd
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-spirv_DEBUG_LIBRARY)
+
+ find_library(Vulkan_glslang-oglcompiler_LIBRARY
+ NAMES OGLCompiler
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-oglcompiler_LIBRARY)
+
+ find_library(Vulkan_glslang-oglcompiler_DEBUG_LIBRARY
+ NAMES OGLCompilerd
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-oglcompiler_DEBUG_LIBRARY)
+
+ find_library(Vulkan_glslang-osdependent_LIBRARY
+ NAMES OSDependent
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-osdependent_LIBRARY)
+
+ find_library(Vulkan_glslang-osdependent_DEBUG_LIBRARY
+ NAMES OSDependentd
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-osdependent_DEBUG_LIBRARY)
+
+ find_library(Vulkan_glslang-machineindependent_LIBRARY
+ NAMES MachineIndependent
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-machineindependent_LIBRARY)
+
+ find_library(Vulkan_glslang-machineindependent_DEBUG_LIBRARY
+ NAMES MachineIndependentd
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-machineindependent_DEBUG_LIBRARY)
+
+ find_library(Vulkan_glslang-genericcodegen_LIBRARY
+ NAMES GenericCodeGen
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-genericcodegen_LIBRARY)
+
+ find_library(Vulkan_glslang-genericcodegen_DEBUG_LIBRARY
+ NAMES GenericCodeGend
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang-genericcodegen_DEBUG_LIBRARY)
+
+ find_library(Vulkan_glslang_LIBRARY
+ NAMES glslang
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang_LIBRARY)
+
+ find_library(Vulkan_glslang_DEBUG_LIBRARY
+ NAMES glslangd
+ HINTS
+ ${_Vulkan_hint_library_search_paths}
+ )
+ mark_as_advanced(Vulkan_glslang_DEBUG_LIBRARY)
+endif()
+if(shaderc_combined IN_LIST Vulkan_FIND_COMPONENTS)
+ find_library(Vulkan_shaderc_combined_LIBRARY
+ NAMES shaderc_combined
+ HINTS
+ ${_Vulkan_hint_library_search_paths})
+ mark_as_advanced(Vulkan_shaderc_combined_LIBRARY)
+
+ find_library(Vulkan_shaderc_combined_DEBUG_LIBRARY
+ NAMES shaderc_combinedd
+ HINTS
+ ${_Vulkan_hint_library_search_paths})
+ mark_as_advanced(Vulkan_shaderc_combined_DEBUG_LIBRARY)
+endif()
+if(SPIRV-Tools IN_LIST Vulkan_FIND_COMPONENTS)
+ find_library(Vulkan_SPIRV-Tools_LIBRARY
+ NAMES SPIRV-Tools
+ HINTS
+ ${_Vulkan_hint_library_search_paths})
+ mark_as_advanced(Vulkan_SPIRV-Tools_LIBRARY)
+
+ find_library(Vulkan_SPIRV-Tools_DEBUG_LIBRARY
+ NAMES SPIRV-Toolsd
+ HINTS
+ ${_Vulkan_hint_library_search_paths})
+ mark_as_advanced(Vulkan_SPIRV-Tools_DEBUG_LIBRARY)
+endif()
+
+if(Vulkan_GLSLC_EXECUTABLE)
+ set(Vulkan_glslc_FOUND TRUE)
+else()
+ set(Vulkan_glslc_FOUND FALSE)
+endif()
+
+if(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE)
+ set(Vulkan_glslangValidator_FOUND TRUE)
+else()
+ set(Vulkan_glslangValidator_FOUND FALSE)
endif()
+function(_Vulkan_set_library_component_found component)
+ cmake_parse_arguments(PARSE_ARGV 1 _ARG
+ "NO_WARNING"
+ ""
+ "DEPENDENT_COMPONENTS")
+
+ set(all_dependent_component_found TRUE)
+ foreach(dependent_component IN LISTS _ARG_DEPENDENT_COMPONENTS)
+ if(NOT Vulkan_${dependent_component}_FOUND)
+ set(all_dependent_component_found FALSE)
+ break()
+ endif()
+ endforeach()
+
+ if(all_dependent_component_found AND (Vulkan_${component}_LIBRARY OR Vulkan_${component}_DEBUG_LIBRARY))
+ set(Vulkan_${component}_FOUND TRUE PARENT_SCOPE)
+
+ # For Windows Vulkan SDK, third party tools binaries are provided with different MSVC ABI:
+ # - Release binaries uses a runtime library
+ # - Debug binaries uses a debug runtime library
+ # This lead to incompatibilities in linking for some configuration types due to CMake-default or project-configured selected MSVC ABI.
+ if(WIN32 AND NOT _ARG_NO_WARNING)
+ if(NOT Vulkan_${component}_LIBRARY)
+ message(WARNING
+"Library ${component} for Release configuration is missing, imported target Vulkan::${component} may not be able to link when targeting this build configuration due to incompatible MSVC ABI.")
+ endif()
+ if(NOT Vulkan_${component}_DEBUG_LIBRARY)
+ message(WARNING
+"Library ${component} for Debug configuration is missing, imported target Vulkan::${component} may not be able to link when targeting this build configuration due to incompatible MSVC ABI. Consider re-installing the Vulkan SDK and request debug libraries to fix this warning.")
+ endif()
+ endif()
+ else()
+ set(Vulkan_${component}_FOUND FALSE PARENT_SCOPE)
+ endif()
+endfunction()
+
+_Vulkan_set_library_component_found(glslang-spirv NO_WARNING)
+_Vulkan_set_library_component_found(glslang-oglcompiler NO_WARNING)
+_Vulkan_set_library_component_found(glslang-osdependent NO_WARNING)
+_Vulkan_set_library_component_found(glslang-machineindependent NO_WARNING)
+_Vulkan_set_library_component_found(glslang-genericcodegen NO_WARNING)
+_Vulkan_set_library_component_found(glslang
+ DEPENDENT_COMPONENTS
+ glslang-spirv
+ glslang-oglcompiler
+ glslang-osdependent
+ glslang-machineindependent
+ glslang-genericcodegen)
+_Vulkan_set_library_component_found(shaderc_combined)
+_Vulkan_set_library_component_found(SPIRV-Tools)
+
set(Vulkan_LIBRARIES ${Vulkan_LIBRARY})
set(Vulkan_INCLUDE_DIRS ${Vulkan_INCLUDE_DIR})
@@ -162,11 +416,9 @@ find_package_handle_standard_args(Vulkan
Vulkan_INCLUDE_DIR
VERSION_VAR
Vulkan_VERSION
+ HANDLE_COMPONENTS
)
-mark_as_advanced(Vulkan_INCLUDE_DIR Vulkan_LIBRARY Vulkan_GLSLC_EXECUTABLE
- Vulkan_GLSLANG_VALIDATOR_EXECUTABLE)
-
if(Vulkan_FOUND AND NOT TARGET Vulkan::Vulkan)
add_library(Vulkan::Vulkan UNKNOWN IMPORTED)
set_target_properties(Vulkan::Vulkan PROPERTIES
@@ -189,3 +441,217 @@ if(Vulkan_FOUND AND Vulkan_GLSLANG_VALIDATOR_EXECUTABLE AND NOT TARGET Vulkan::g
add_executable(Vulkan::glslangValidator IMPORTED)
set_property(TARGET Vulkan::glslangValidator PROPERTY IMPORTED_LOCATION "${Vulkan_GLSLANG_VALIDATOR_EXECUTABLE}")
endif()
+
+if(Vulkan_FOUND)
+ if((Vulkan_glslang-spirv_LIBRARY OR Vulkan_glslang-spirv_DEBUG_LIBRARY) AND NOT TARGET Vulkan::glslang-spirv)
+ add_library(Vulkan::glslang-spirv STATIC IMPORTED)
+ set_property(TARGET Vulkan::glslang-spirv
+ PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}")
+ if(Vulkan_glslang-spirv_LIBRARY)
+ set_property(TARGET Vulkan::glslang-spirv APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Release)
+ set_property(TARGET Vulkan::glslang-spirv
+ PROPERTY
+ IMPORTED_LOCATION_RELEASE "${Vulkan_glslang-spirv_LIBRARY}")
+ endif()
+ if(Vulkan_glslang-spirv_DEBUG_LIBRARY)
+ set_property(TARGET Vulkan::glslang-spirv APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Debug)
+ set_property(TARGET Vulkan::glslang-spirv
+ PROPERTY
+ IMPORTED_LOCATION_DEBUG "${Vulkan_glslang-spirv_DEBUG_LIBRARY}")
+ endif()
+ endif()
+
+ if((Vulkan_glslang-oglcompiler_LIBRARY OR Vulkan_glslang-oglcompiler_DEBUG_LIBRARY) AND NOT TARGET Vulkan::glslang-oglcompiler)
+ add_library(Vulkan::glslang-oglcompiler STATIC IMPORTED)
+ set_property(TARGET Vulkan::glslang-oglcompiler
+ PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}")
+ if(Vulkan_glslang-oglcompiler_LIBRARY)
+ set_property(TARGET Vulkan::glslang-oglcompiler APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Release)
+ set_property(TARGET Vulkan::glslang-oglcompiler
+ PROPERTY
+ IMPORTED_LOCATION_RELEASE "${Vulkan_glslang-oglcompiler_LIBRARY}")
+ endif()
+ if(Vulkan_glslang-oglcompiler_DEBUG_LIBRARY)
+ set_property(TARGET Vulkan::glslang-oglcompiler APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Debug)
+ set_property(TARGET Vulkan::glslang-oglcompiler
+ PROPERTY
+ IMPORTED_LOCATION_DEBUG "${Vulkan_glslang-oglcompiler_DEBUG_LIBRARY}")
+ endif()
+ endif()
+
+ if((Vulkan_glslang-osdependent_LIBRARY OR Vulkan_glslang-osdependent_DEBUG_LIBRARY) AND NOT TARGET Vulkan::glslang-osdependent)
+ add_library(Vulkan::glslang-osdependent STATIC IMPORTED)
+ set_property(TARGET Vulkan::glslang-osdependent
+ PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}")
+ if(Vulkan_glslang-osdependent_LIBRARY)
+ set_property(TARGET Vulkan::glslang-osdependent APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Release)
+ set_property(TARGET Vulkan::glslang-osdependent
+ PROPERTY
+ IMPORTED_LOCATION_RELEASE "${Vulkan_glslang-osdependent_LIBRARY}")
+ endif()
+ if(Vulkan_glslang-osdependent_DEBUG_LIBRARY)
+ set_property(TARGET Vulkan::glslang-osdependent APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Debug)
+ set_property(TARGET Vulkan::glslang-osdependent
+ PROPERTY
+ IMPORTED_LOCATION_DEBUG "${Vulkan_glslang-osdependent_DEBUG_LIBRARY}")
+ endif()
+ endif()
+
+ if((Vulkan_glslang-machineindependent_LIBRARY OR Vulkan_glslang-machineindependent_DEBUG_LIBRARY) AND NOT TARGET Vulkan::glslang-machineindependent)
+ add_library(Vulkan::glslang-machineindependent STATIC IMPORTED)
+ set_property(TARGET Vulkan::glslang-machineindependent
+ PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}")
+ if(Vulkan_glslang-machineindependent_LIBRARY)
+ set_property(TARGET Vulkan::glslang-machineindependent APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Release)
+ set_property(TARGET Vulkan::glslang-machineindependent
+ PROPERTY
+ IMPORTED_LOCATION_RELEASE "${Vulkan_glslang-machineindependent_LIBRARY}")
+ endif()
+ if(Vulkan_glslang-machineindependent_DEBUG_LIBRARY)
+ set_property(TARGET Vulkan::glslang-machineindependent APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Debug)
+ set_property(TARGET Vulkan::glslang-machineindependent
+ PROPERTY
+ IMPORTED_LOCATION_DEBUG "${Vulkan_glslang-machineindependent_DEBUG_LIBRARY}")
+ endif()
+ endif()
+
+ if((Vulkan_glslang-genericcodegen_LIBRARY OR Vulkan_glslang-genericcodegen_DEBUG_LIBRARY) AND NOT TARGET Vulkan::glslang-genericcodegen)
+ add_library(Vulkan::glslang-genericcodegen STATIC IMPORTED)
+ set_property(TARGET Vulkan::glslang-genericcodegen
+ PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}")
+ if(Vulkan_glslang-genericcodegen_LIBRARY)
+ set_property(TARGET Vulkan::glslang-genericcodegen APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Release)
+ set_property(TARGET Vulkan::glslang-genericcodegen
+ PROPERTY
+ IMPORTED_LOCATION_RELEASE "${Vulkan_glslang-genericcodegen_LIBRARY}")
+ endif()
+ if(Vulkan_glslang-genericcodegen_DEBUG_LIBRARY)
+ set_property(TARGET Vulkan::glslang-genericcodegen APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Debug)
+ set_property(TARGET Vulkan::glslang-genericcodegen
+ PROPERTY
+ IMPORTED_LOCATION_DEBUG "${Vulkan_glslang-genericcodegen_DEBUG_LIBRARY}")
+ endif()
+ endif()
+
+ if((Vulkan_glslang_LIBRARY OR Vulkan_glslang_DEBUG_LIBRARY)
+ AND TARGET Vulkan::glslang-spirv
+ AND TARGET Vulkan::glslang-oglcompiler
+ AND TARGET Vulkan::glslang-osdependent
+ AND TARGET Vulkan::glslang-machineindependent
+ AND TARGET Vulkan::glslang-genericcodegen
+ AND NOT TARGET Vulkan::glslang)
+ add_library(Vulkan::glslang STATIC IMPORTED)
+ set_property(TARGET Vulkan::glslang
+ PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}")
+ if(Vulkan_glslang_LIBRARY)
+ set_property(TARGET Vulkan::glslang APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Release)
+ set_property(TARGET Vulkan::glslang
+ PROPERTY
+ IMPORTED_LOCATION_RELEASE "${Vulkan_glslang_LIBRARY}")
+ endif()
+ if(Vulkan_glslang_DEBUG_LIBRARY)
+ set_property(TARGET Vulkan::glslang APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Debug)
+ set_property(TARGET Vulkan::glslang
+ PROPERTY
+ IMPORTED_LOCATION_DEBUG "${Vulkan_glslang_DEBUG_LIBRARY}")
+ endif()
+ target_link_libraries(Vulkan::glslang
+ INTERFACE
+ Vulkan::glslang-spirv
+ Vulkan::glslang-oglcompiler
+ Vulkan::glslang-osdependent
+ Vulkan::glslang-machineindependent
+ Vulkan::glslang-genericcodegen
+ )
+ endif()
+
+ if((Vulkan_shaderc_combined_LIBRARY OR Vulkan_shaderc_combined_DEBUG_LIBRARY) AND NOT TARGET Vulkan::shaderc_combined)
+ add_library(Vulkan::shaderc_combined STATIC IMPORTED)
+ set_property(TARGET Vulkan::shaderc_combined
+ PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}")
+ if(Vulkan_shaderc_combined_LIBRARY)
+ set_property(TARGET Vulkan::shaderc_combined APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Release)
+ set_property(TARGET Vulkan::shaderc_combined
+ PROPERTY
+ IMPORTED_LOCATION_RELEASE "${Vulkan_shaderc_combined_LIBRARY}")
+ endif()
+ if(Vulkan_shaderc_combined_DEBUG_LIBRARY)
+ set_property(TARGET Vulkan::shaderc_combined APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Debug)
+ set_property(TARGET Vulkan::shaderc_combined
+ PROPERTY
+ IMPORTED_LOCATION_DEBUG "${Vulkan_shaderc_combined_DEBUG_LIBRARY}")
+ endif()
+
+ if(UNIX)
+ find_package(Threads REQUIRED)
+ target_link_libraries(Vulkan::shaderc_combined
+ INTERFACE
+ Threads::Threads)
+ endif()
+ endif()
+
+ if((Vulkan_SPIRV-Tools_LIBRARY OR Vulkan_SPIRV-Tools_DEBUG_LIBRARY) AND NOT TARGET Vulkan::SPIRV-Tools)
+ add_library(Vulkan::SPIRV-Tools STATIC IMPORTED)
+ set_property(TARGET Vulkan::SPIRV-Tools
+ PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}")
+ if(Vulkan_SPIRV-Tools_LIBRARY)
+ set_property(TARGET Vulkan::SPIRV-Tools APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Release)
+ set_property(TARGET Vulkan::SPIRV-Tools
+ PROPERTY
+ IMPORTED_LOCATION_RELEASE "${Vulkan_SPIRV-Tools_LIBRARY}")
+ endif()
+ if(Vulkan_SPIRV-Tools_DEBUG_LIBRARY)
+ set_property(TARGET Vulkan::SPIRV-Tools APPEND
+ PROPERTY
+ IMPORTED_CONFIGURATIONS Debug)
+ set_property(TARGET Vulkan::SPIRV-Tools
+ PROPERTY
+ IMPORTED_LOCATION_DEBUG "${Vulkan_SPIRV-Tools_DEBUG_LIBRARY}")
+ endif()
+ endif()
+endif()
+
+unset(_Vulkan_library_name)
+unset(_Vulkan_hint_include_search_paths)
+unset(_Vulkan_hint_executable_search_paths)
+unset(_Vulkan_hint_library_search_paths)
+
+cmake_policy(POP)
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 4af842a..f50116f 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -77,8 +77,13 @@ set(_ZLIB_SEARCH_NORMAL
unset(_ZLIB_x86)
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
-set(ZLIB_NAMES z zlib zdll zlib1 zlibstatic zlibstat zlibvc)
-set(ZLIB_NAMES_DEBUG zd zlibd zdlld zlibd1 zlib1d zlibstaticd zlibstatd zlibvcd)
+if(ZLIB_USE_STATIC_LIBS)
+ set(ZLIB_NAMES zlibstatic zlibstat zlib z)
+ set(ZLIB_NAMES_DEBUG zlibstaticd zlibstatd zlibd zd)
+else()
+ set(ZLIB_NAMES z zlib zdll zlib1 zlibstatic zlibwapi zlibvc zlibstat)
+ set(ZLIB_NAMES_DEBUG zd zlibd zdlld zlibd1 zlib1d zlibstaticd zlibwapid zlibvcd zlibstatd)
+endif()
# Try each search configuration.
foreach(search ${_ZLIB_SEARCHES})
@@ -87,9 +92,15 @@ endforeach()
# Allow ZLIB_LIBRARY to be set manually, as the location of the zlib library
if(NOT ZLIB_LIBRARY)
+ set(_zlib_ORIG_CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
+ set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ # Prefix/suffix of the win32/Makefile.gcc build
+ if(WIN32)
+ list(APPEND CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a")
+ endif()
# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
if(ZLIB_USE_STATIC_LIBS)
- set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
@@ -103,9 +114,8 @@ if(NOT ZLIB_LIBRARY)
endforeach()
# Restore the original find library ordering
- if(ZLIB_USE_STATIC_LIBS)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
- endif()
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+ set(CMAKE_FIND_LIBRARY_PREFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_PREFIXES})
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
select_library_configurations(ZLIB)
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt
index ce0bc10..fb35ff0 100644
--- a/Modules/FortranCInterface/CMakeLists.txt
+++ b/Modules/FortranCInterface/CMakeLists.txt
@@ -112,6 +112,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND
CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
target_compile_options(FortranCInterface PRIVATE "-fno-lto")
target_compile_options(myfort PRIVATE "-flto=auto" "-ffat-lto-objects")
+endif()
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
+ CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
target_compile_options(symbols PRIVATE "-flto=auto" "-ffat-lto-objects")
endif()
diff --git a/Modules/Internal/CPack/CPackNuGet.cmake b/Modules/Internal/CPack/CPackNuGet.cmake
index fb363f4..056d025 100644
--- a/Modules/Internal/CPack/CPackNuGet.cmake
+++ b/Modules/Internal/CPack/CPackNuGet.cmake
@@ -332,7 +332,9 @@ endfunction()
function(_cpack_nuget_make_files_tag)
set(_files)
foreach(_comp IN LISTS ARGN)
- string(APPEND _files " <file src=\"${_comp}/**\" target=\".\" />\n")
+ cmake_path(APPEND _comp "**")
+ cmake_path(NATIVE_PATH _comp _comp)
+ string(APPEND _files " <file src=\"${_comp}\" target=\".\" />\n")
endforeach()
set(_CPACK_NUGET_FILES_TAG "<files>\n${_files} </files>" PARENT_SCOPE)
endfunction()
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake
index 82c4383..3941311 100644
--- a/Modules/Platform/Windows-Clang.cmake
+++ b/Modules/Platform/Windows-Clang.cmake
@@ -191,7 +191,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
set(_COMPILE_${lang} "${_COMPILE_${lang}_MSVC}")
__windows_compiler_msvc(${lang})
set(CMAKE_${lang}_COMPILE_OPTIONS_WARNING_AS_ERROR "-WX")
- set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-imsvc ")
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-imsvc")
endmacro()
else()
cmake_policy(GET CMP0091 __WINDOWS_CLANG_CMP0091)