summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/cpack_gen/productbuild.rst40
-rw-r--r--Help/release/dev/cpack-productbuild-domains.rst9
-rw-r--r--Modules/CMakeCheckCompilerFlagCommonPatterns.cmake1
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake2
-rw-r--r--Modules/Platform/Windows-MSVC.cmake6
-rw-r--r--Source/CMakeLists.txt1
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackPKGGenerator.cxx37
-rw-r--r--Source/CPack/cmCPackPKGGenerator.h4
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx6
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx4
-rw-r--r--Source/cmLocalVisualStudioGenerator.h9
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx64
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h7
-rw-r--r--Source/cmVsProjectType.h11
-rw-r--r--Tests/RunCMake/Framework/FrameworkSystemIncludeTest.c8
-rw-r--r--Tests/RunCMake/Framework/FrameworkSystemIncludeTest.cmake12
-rw-r--r--Tests/RunCMake/Framework/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/Framework/subdir/Example.framework/Example.tbd0
-rw-r--r--Tests/RunCMake/Framework/subdir/Example.framework/Headers/Example.h1
-rw-r--r--Utilities/cmnghttp2/CMakeLists.txt8
22 files changed, 190 insertions, 56 deletions
diff --git a/Help/cpack_gen/productbuild.rst b/Help/cpack_gen/productbuild.rst
index 75d5cff..dc98c85 100644
--- a/Help/cpack_gen/productbuild.rst
+++ b/Help/cpack_gen/productbuild.rst
@@ -86,6 +86,46 @@ macOS using ProductBuild:
:variable:`CPACK_RESOURCE_FILE_README`, and
:variable:`CPACK_RESOURCE_FILE_LICENSE` files are copied.
+.. variable:: CPACK_PRODUCTBUILD_DOMAINS
+
+ .. versionadded:: 3.23
+
+ Adds a domains element to Distribution XML if specified. When set to true,
+ the productbuild generator creates the following XML element:
+
+ .. code-block:: xml
+
+ <domains enable_anywhere="true" enable_currentUserHome="false" enable_localSystem="true"/>
+
+ The default values used for the attributes can be overridden with
+ :variable:`CPACK_PRODUCTBUILD_DOMAINS_ANYWHERE`,
+ :variable:`CPACK_PRODUCTBUILD_DOMAINS_USER`, and
+ :variable:`CPACK_PRODUCTBUILD_DOMAINS_ROOT`.
+
+.. variable:: CPACK_PRODUCTBUILD_DOMAINS_ANYWHERE
+
+ .. versionadded:: 3.23
+
+ May be used to override the ``enable_anywhere`` attribute in the domains
+ element in the Distribution XML when :variable:`CPACK_PRODUCTBUILD_DOMAINS`
+ is set to ``TRUE``.
+
+.. variable:: CPACK_PRODUCTBUILD_DOMAINS_USER
+
+ .. versionadded:: 3.23
+
+ May be used to override the ``enable_currentUserHome`` attribute in the domains
+ element in the Distribution XML when :variable:`CPACK_PRODUCTBUILD_DOMAINS`
+ is set to ``TRUE``.
+
+.. variable:: CPACK_PRODUCTBUILD_DOMAINS_ROOT
+
+ .. versionadded:: 3.23
+
+ May be used to override the ``enable_localSystem`` attribute in the domains
+ element in the Distribution XML when :variable:`CPACK_PRODUCTBUILD_DOMAINS`
+ is set to ``TRUE``.
+
Background Image
""""""""""""""""
diff --git a/Help/release/dev/cpack-productbuild-domains.rst b/Help/release/dev/cpack-productbuild-domains.rst
new file mode 100644
index 0000000..32a2eee
--- /dev/null
+++ b/Help/release/dev/cpack-productbuild-domains.rst
@@ -0,0 +1,9 @@
+cpack-productbuild-domains
+-----------------------------
+
+* The :cpack_gen:`CPack productbuild Generator` gained the new
+ :variable:`CPACK_PRODUCTBUILD_DOMAINS`,
+ :variable:`CPACK_PRODUCTBUILD_DOMAINS_ANYWHERE`,
+ :variable:`CPACK_PRODUCTBUILD_DOMAINS_USER`, and
+ :variable:`CPACK_PRODUCTBUILD_DOMAINS_ROOT` variables for
+ adding the domains element to the Distribution XML.
diff --git a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
index bda1d71..8f59acd 100644
--- a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
+++ b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
@@ -13,6 +13,7 @@ macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR)
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "optimization flag .* not supported" # Clang
FAIL_REGEX "unknown argument ignored" # Clang (cl)
+ FAIL_REGEX "warning: .* ignored" # Clang (linker)
FAIL_REGEX "ignoring unknown option" # MSVC, Intel
FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "option.*not supported" # Intel
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index a1814b7..d03cbef 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -104,7 +104,7 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS ARMCC)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_ARMCC )
- set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMCC "(ARM Compiler)|(ARM Assembler)")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMCC "(ARM Compiler)|(ARM Assembler)|(Arm Compiler)")
list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS NASM)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_NASM "-v")
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 435d224..b2cc6f4 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -226,7 +226,7 @@ elseif(WINDOWS_PHONE OR WINDOWS_STORE)
else()
set(_PLATFORM_DEFINES "/DWIN32")
if((_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM64EC") OR (_MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM64EC"))
- set(_PLATFORM_DEFINES "${_PLATFORM_DEFINES} /D_AMD64_ /DAMD64 /D_ARM64EC_ /DARM64EC /D_ARM64EC_WORKAROUND_")
+ set(_PLATFORM_DEFINES "${_PLATFORM_DEFINES} /D_AMD64_ /DAMD64 /D_ARM64EC_ /DARM64EC")
endif()
if(_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM" OR _MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib")
@@ -246,6 +246,10 @@ else()
set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib")
endif()
+ if((_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM64EC") OR (_MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM64EC"))
+ string(APPEND CMAKE_C_STANDARD_LIBRARIES_INIT " softintrin.lib")
+ endif()
+
if(MSVC_VERSION LESS 1310)
set(_FLAGS_C " /Zm1000${_FLAGS_C}")
set(_FLAGS_CXX " /Zm1000${_FLAGS_CXX}")
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 677fd2f..a9aec6c 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -766,6 +766,7 @@ if (WIN32)
cmGlobalVisualStudio9Generator.h
cmVisualStudioGeneratorOptions.h
cmVisualStudioGeneratorOptions.cxx
+ cmVsProjectType.h
cmVisualStudio10TargetGenerator.h
cmVisualStudio10TargetGenerator.cxx
cmLocalVisualStudio10Generator.cxx
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 5c8c68b..4cc5400 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 22)
-set(CMake_VERSION_PATCH 20220105)
+set(CMake_VERSION_PATCH 20220107)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx
index b62fab8..d8095cc 100644
--- a/Source/CPack/cmCPackPKGGenerator.cxx
+++ b/Source/CPack/cmCPackPKGGenerator.cxx
@@ -162,6 +162,8 @@ void cmCPackPKGGenerator::WriteDistributionFile(const char* metapackageFile,
CreateChoice(PostFlightComponent, xout);
}
+ this->CreateDomains(xout);
+
// default background
this->CreateBackground(nullptr, metapackageFile, genName, xout);
// Dark Aqua
@@ -273,7 +275,10 @@ void cmCPackPKGGenerator::CreateChoice(const cmCPackComponent& component,
xout.Attribute("id", packageId);
xout.Attribute("version", this->GetOption("CPACK_PACKAGE_VERSION"));
xout.Attribute("installKBytes", installedSize);
- xout.Attribute("auth", "Admin");
+ // The auth attribute is deprecated in favor of the domains element
+ if (cmIsOff(this->GetOption("CPACK_PRODUCTBUILD_DOMAINS"))) {
+ xout.Attribute("auth", "Admin");
+ }
xout.Attribute("onConclusion", "None");
if (component.IsDownloaded) {
xout.Content(this->GetOption("CPACK_DOWNLOAD_SITE"));
@@ -286,6 +291,36 @@ void cmCPackPKGGenerator::CreateChoice(const cmCPackComponent& component,
xout.EndElement(); // pkg-ref
}
+void cmCPackPKGGenerator::CreateDomains(cmXMLWriter& xout)
+{
+ std::string opt = "CPACK_PRODUCTBUILD_DOMAINS";
+ if (cmIsOff(this->GetOption(opt))) {
+ return;
+ }
+
+ xout.StartElement("domains");
+
+ // Product can be installed at the root of any volume by default
+ // unless specified
+ cmValue param = this->GetOption(cmStrCat(opt, "_ANYWHERE"));
+ xout.Attribute("enable_anywhere",
+ (param && cmIsOff(param)) ? "false" : "true");
+
+ // Product cannot be installed into the current user's home directory
+ // by default unless specified
+ param = this->GetOption(cmStrCat(opt, "_USER"));
+ xout.Attribute("enable_currentUserHome",
+ (param && cmIsOn(param)) ? "true" : "false");
+
+ // Product can be installed into the root directory by default
+ // unless specified
+ param = this->GetOption(cmStrCat(opt, "_ROOT"));
+ xout.Attribute("enable_localSystem",
+ (param && cmIsOff(param)) ? "false" : "true");
+
+ xout.EndElement();
+}
+
void cmCPackPKGGenerator::AddDependencyAttributes(
const cmCPackComponent& component,
std::set<const cmCPackComponent*>& visited, std::ostringstream& out)
diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h
index 5d97d16..256b334 100644
--- a/Source/CPack/cmCPackPKGGenerator.h
+++ b/Source/CPack/cmCPackPKGGenerator.h
@@ -91,6 +91,10 @@ protected:
void CreateBackground(const char* themeName, const char* metapackageFile,
cm::string_view genName, cmXMLWriter& xout);
+ /// Create the "domains" XML element to indicate where the product can
+ /// be installed
+ void CreateDomains(cmXMLWriter& xout);
+
// The PostFlight component when creating a metapackage
cmCPackComponent PostFlightComponent;
};
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 44a3eb7..bc2a6f7 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2683,7 +2683,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
if (emitted.insert(frameworkDir).second) {
std::string incpath = this->XCodeEscapePath(frameworkDir);
if (emitSystemIncludes &&
- gtgt->IsSystemIncludeDirectory(frameworkDir, configName,
+ gtgt->IsSystemIncludeDirectory(include, configName,
langForPreprocessor)) {
sysfdirs.Add(incpath);
} else {
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index fd13c0b..4bf8df6 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -40,6 +40,7 @@
#include "cmTarget.h"
#include "cmTargetDepend.h"
#include "cmValue.h"
+#include "cmVsProjectType.h"
#include "cmXMLParser.h"
#include "cmake.h"
@@ -574,7 +575,8 @@ public:
{
// If any commands were generated, finish constructing them.
if (!this->First) {
- std::string finishScript = this->LG->FinishConstructScript(IsCSharp::No);
+ std::string finishScript =
+ this->LG->FinishConstructScript(VsProjectType::vcxproj);
this->Stream << this->LG->EscapeForXML(finishScript) << "\"";
}
@@ -1817,7 +1819,7 @@ void cmLocalVisualStudio7Generator::WriteCustomRule(
if (this->FortranProject) {
cmSystemTools::ReplaceString(script, "$(Configuration)", config);
}
- script += this->FinishConstructScript(IsCSharp::No);
+ script += this->FinishConstructScript(VsProjectType::vcxproj);
/* clang-format off */
fout << "\t\t\t\t\t<Tool\n"
<< "\t\t\t\t\tName=\"" << customTool << "\"\n"
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index a21293b..93f01ed 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -245,14 +245,14 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
}
std::string cmLocalVisualStudioGenerator::FinishConstructScript(
- IsCSharp isCSharp, const std::string& newline)
+ VsProjectType projectType, const std::string& newline)
{
bool useLocal = this->CustomCommandUseLocal();
// Store the script in a string.
std::string script;
- if (useLocal && isCSharp == IsCSharp::Yes) {
+ if (useLocal && projectType == VsProjectType::csproj) {
// This label is not provided by MSBuild for C# projects.
script += newline;
script += this->GetReportErrorLabel();
diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h
index 82a62cf..cf4f4d9 100644
--- a/Source/cmLocalVisualStudioGenerator.h
+++ b/Source/cmLocalVisualStudioGenerator.h
@@ -10,6 +10,7 @@
#include "cmGlobalVisualStudioGenerator.h"
#include "cmLocalGenerator.h"
+#include "cmVsProjectType.h"
class cmCustomCommand;
class cmCustomCommandGenerator;
@@ -30,15 +31,9 @@ public:
cmLocalVisualStudioGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
virtual ~cmLocalVisualStudioGenerator();
- /** Construct a script from the given list of command lines. */
- enum class IsCSharp
- {
- No,
- Yes
- };
std::string ConstructScript(cmCustomCommandGenerator const& ccg,
const std::string& newline = "\n");
- std::string FinishConstructScript(IsCSharp isCSharp,
+ std::string FinishConstructScript(VsProjectType projectType,
const std::string& newline = "\n");
/** Label to which to jump in a batch file after a failed step in a
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 84044e4..685d34d 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -235,14 +235,27 @@ static bool cmVS10IsTargetsFile(std::string const& path)
return cmSystemTools::Strucmp(ext.c_str(), ".targets") == 0;
}
-static std::string computeProjectFileExtension(cmGeneratorTarget const* t)
+static VsProjectType computeProjectType(cmGeneratorTarget const* t)
{
- std::string res;
- res = ".vcxproj";
if (t->IsCSharpOnly()) {
- res = ".csproj";
+ return VsProjectType::csproj;
+ }
+ return VsProjectType::vcxproj;
+}
+
+static std::string computeProjectFileExtension(VsProjectType projectType)
+{
+ switch (projectType) {
+ case VsProjectType::csproj:
+ return ".csproj";
+ default:
+ return ".vcxproj";
}
- return res;
+}
+
+static std::string computeProjectFileExtension(cmGeneratorTarget const* t)
+{
+ return computeProjectFileExtension(computeProjectType(t));
}
cmVisualStudio10TargetGenerator::cmVisualStudio10TargetGenerator(
@@ -339,21 +352,18 @@ std::ostream& cmVisualStudio10TargetGenerator::Elem::WriteString(
void cmVisualStudio10TargetGenerator::Generate()
{
+ this->ProjectType = computeProjectType(this->GeneratorTarget);
+ this->Managed = this->ProjectType == VsProjectType::csproj;
const std::string ProjectFileExtension =
- computeProjectFileExtension(this->GeneratorTarget);
- if (ProjectFileExtension == ".vcxproj") {
- this->ProjectType = VsProjectType::vcxproj;
- this->Managed = false;
- } else if (ProjectFileExtension == ".csproj") {
- if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) {
- std::string message = "The C# target \"" +
- this->GeneratorTarget->GetName() +
- "\" is of type STATIC_LIBRARY. This is discouraged (and may be "
- "disabled in future). Make it a SHARED library instead.";
- this->Makefile->IssueMessage(MessageType::DEPRECATION_WARNING, message);
- }
- this->ProjectType = VsProjectType::csproj;
- this->Managed = true;
+ computeProjectFileExtension(this->ProjectType);
+
+ if (this->ProjectType == VsProjectType::csproj &&
+ this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) {
+ std::string message = "The C# target \"" +
+ this->GeneratorTarget->GetName() +
+ "\" is of type STATIC_LIBRARY. This is discouraged (and may be "
+ "disabled in future). Make it a SHARED library instead.";
+ this->Makefile->IssueMessage(MessageType::DEPRECATION_WARNING, message);
}
if (this->Android &&
@@ -406,7 +416,7 @@ void cmVisualStudio10TargetGenerator::Generate()
char magic[] = { char(0xEF), char(0xBB), char(0xBF) };
BuildFileStream.write(magic, 3);
- if (this->Managed && this->ProjectType == VsProjectType::csproj &&
+ if (this->ProjectType == VsProjectType::csproj &&
this->GeneratorTarget->IsDotNetSdkTarget() &&
this->GlobalGenerator->GetVersion() >=
cmGlobalVisualStudioGenerator::VS16) {
@@ -832,7 +842,7 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
void cmVisualStudio10TargetGenerator::WriteSdkStyleProjectFile(
cmGeneratedFileStream& BuildFileStream)
{
- if (!this->Managed || this->ProjectType != VsProjectType::csproj ||
+ if (this->ProjectType != VsProjectType::csproj ||
!this->GeneratorTarget->IsDotNetSdkTarget()) {
std::string message = "The target \"" + this->GeneratorTarget->GetName() +
"\" is not eligible for .Net SDK style project.";
@@ -1711,11 +1721,7 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
}
}
}
- cmLocalVisualStudioGenerator::IsCSharp isCSharp =
- (this->ProjectType == VsProjectType::csproj)
- ? cmLocalVisualStudioGenerator::IsCSharp::Yes
- : cmLocalVisualStudioGenerator::IsCSharp::No;
- script += lg->FinishConstructScript(isCSharp);
+ script += lg->FinishConstructScript(this->ProjectType);
if (this->ProjectType == VsProjectType::csproj) {
std::string name = "CustomCommand_" + c + "_" +
cmSystemTools::ComputeStringMD5(sourcePath);
@@ -4449,11 +4455,7 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
}
}
if (!script.empty()) {
- cmLocalVisualStudioGenerator::IsCSharp isCSharp =
- (this->ProjectType == VsProjectType::csproj)
- ? cmLocalVisualStudioGenerator::IsCSharp::Yes
- : cmLocalVisualStudioGenerator::IsCSharp::No;
- script += lg->FinishConstructScript(isCSharp);
+ script += lg->FinishConstructScript(this->ProjectType);
}
comment = cmVS10EscapeComment(comment);
if (this->ProjectType != VsProjectType::csproj) {
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 37b8dfd..8d2b77d 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -14,6 +14,7 @@
#include <vector>
#include "cmGeneratorTarget.h"
+#include "cmVsProjectType.h"
class cmComputeLinkInformation;
class cmCustomCommand;
@@ -211,11 +212,7 @@ private:
OptionsMap LinkOptions;
std::string LangForClCompile;
- enum class VsProjectType
- {
- vcxproj,
- csproj
- } ProjectType;
+ VsProjectType ProjectType;
bool InSourceBuild;
std::vector<std::string> Configurations;
std::vector<TargetsFileAndConfigs> TargetsFileAndConfigsVec;
diff --git a/Source/cmVsProjectType.h b/Source/cmVsProjectType.h
new file mode 100644
index 0000000..8899267
--- /dev/null
+++ b/Source/cmVsProjectType.h
@@ -0,0 +1,11 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#pragma once
+
+#include "cmConfigure.h" // IWYU pragma: keep
+
+enum class VsProjectType
+{
+ vcxproj,
+ csproj
+};
diff --git a/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.c b/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.c
new file mode 100644
index 0000000..644a978
--- /dev/null
+++ b/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.c
@@ -0,0 +1,8 @@
+#include <Example/Example.h>
+
+int foo(void);
+
+int foo(void)
+{
+ return 42;
+}
diff --git a/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.cmake b/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.cmake
new file mode 100644
index 0000000..d172281
--- /dev/null
+++ b/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.cmake
@@ -0,0 +1,12 @@
+enable_language(C)
+
+add_library(Example::Example SHARED IMPORTED)
+set_target_properties(Example::Example PROPERTIES
+ FRAMEWORK 1
+ IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/subdir/Example.framework/Example.tbd"
+ INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/subdir/Example.framework;${CMAKE_CURRENT_SOURCE_DIR}/subdir/Example.framework/Headers"
+)
+
+add_library(testcase FrameworkSystemIncludeTest.c)
+target_compile_options(testcase PRIVATE "-Werror=#pragma-messages")
+target_link_libraries(testcase PRIVATE Example::Example)
diff --git a/Tests/RunCMake/Framework/RunCMakeTest.cmake b/Tests/RunCMake/Framework/RunCMakeTest.cmake
index 36eaf5c..2f8fdc7 100644
--- a/Tests/RunCMake/Framework/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Framework/RunCMakeTest.cmake
@@ -93,3 +93,15 @@ function(imported_framework_test)
endfunction()
imported_framework_test()
+
+function(framework_system_include_test)
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/FrameworkSystemIncludeTest-build")
+ set(RunCMake_TEST_NO_CLEAN 1)
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ run_cmake(FrameworkSystemIncludeTest)
+ run_cmake_command(FrameworkSystemIncludeTest-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+framework_system_include_test()
diff --git a/Tests/RunCMake/Framework/subdir/Example.framework/Example.tbd b/Tests/RunCMake/Framework/subdir/Example.framework/Example.tbd
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/Framework/subdir/Example.framework/Example.tbd
diff --git a/Tests/RunCMake/Framework/subdir/Example.framework/Headers/Example.h b/Tests/RunCMake/Framework/subdir/Example.framework/Headers/Example.h
new file mode 100644
index 0000000..92cdb70
--- /dev/null
+++ b/Tests/RunCMake/Framework/subdir/Example.framework/Headers/Example.h
@@ -0,0 +1 @@
+#pragma GCC warning "This should be suppressed"
diff --git a/Utilities/cmnghttp2/CMakeLists.txt b/Utilities/cmnghttp2/CMakeLists.txt
index 8b5e833..7f58f1c 100644
--- a/Utilities/cmnghttp2/CMakeLists.txt
+++ b/Utilities/cmnghttp2/CMakeLists.txt
@@ -7,10 +7,10 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
endif()
# Re-use some check result cache entries from cmcurl:
-# * HAVE_ARPA_INET_H
-# * HAVE_NETINET_IN_H
-# * HAVE_SSIZE_T
-if(NOT HAVE_SSIZE_T)
+# * HAVE_ARPA_INET_H (referenced in cmakeconfig.h.in)
+# * HAVE_NETINET_IN_H (referenced in cmakeconfig.h.in)
+# * HAVE_SIZEOF_SSIZE_T (referenced here)
+if(NOT HAVE_SIZEOF_SSIZE_T)
set(ssize_t KWIML_INT_intptr_t)
endif()
configure_file(cmakeconfig.h.in config.h)