diff options
81 files changed, 539 insertions, 119 deletions
diff --git a/.gitlab/ci/download_qt_hashes.cmake b/.gitlab/ci/download_qt_hashes.cmake index 0d286b5..832fa98 100644 --- a/.gitlab/ci/download_qt_hashes.cmake +++ b/.gitlab/ci/download_qt_hashes.cmake @@ -10,4 +10,4 @@ set("5.15.1-0-202009071110qtwinextras-Windows-Windows_10-MSVC2015-Windows-Window set("5.15.1-0-202009071110qtbase-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z_hash" df2813ce7c6cb4287abd7956cd1cb9d08312e4ac1208b6cb57af4df11b8ebba1) -set("qt-5.9.9-macosx10.10-x86_64-arm64.tar.xz_hash" aa6229bc6bd01a44d18b07023417698fdf4de7a02b14e971b473d80956a57a1c) +set("qt-5.9.9-macosx10.10-x86_64-arm64.tar.xz_hash" d4449771afa0bc6a809c14f1e6d939e7732494cf059503ae451e2bfe8fc60cc1) diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 33af9f7..99d4c42 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -259,6 +259,7 @@ Properties on Targets /prop_tgt/INTERPROCEDURAL_OPTIMIZATION_CONFIG /prop_tgt/IOS_INSTALL_COMBINED /prop_tgt/ISPC_HEADER_DIRECTORY + /prop_tgt/ISPC_HEADER_SUFFIX /prop_tgt/ISPC_INSTRUCTION_SETS /prop_tgt/JOB_POOL_COMPILE /prop_tgt/JOB_POOL_LINK diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index f898ae9..4b2aab9 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -518,6 +518,7 @@ Variables for Languages /variable/CMAKE_Fortran_MODDIR_FLAG /variable/CMAKE_Fortran_MODOUT_FLAG /variable/CMAKE_ISPC_HEADER_DIRECTORY + /variable/CMAKE_ISPC_HEADER_SUFFIX /variable/CMAKE_ISPC_INSTRUCTION_SETS /variable/CMAKE_LANG_ANDROID_TOOLCHAIN_MACHINE /variable/CMAKE_LANG_ANDROID_TOOLCHAIN_PREFIX diff --git a/Help/prop_tgt/ISPC_HEADER_SUFFIX.rst b/Help/prop_tgt/ISPC_HEADER_SUFFIX.rst new file mode 100644 index 0000000..6397e55 --- /dev/null +++ b/Help/prop_tgt/ISPC_HEADER_SUFFIX.rst @@ -0,0 +1,14 @@ +ISPC_HEADER_SUFFIX +------------------ + +.. versionadded:: 3.19.2 + +Specify output suffix to be used for ISPC generated headers provided by the target. + +This property is initialized by the value of the :variable:`CMAKE_ISPC_HEADER_SUFFIX` +variable if it is set when a target is created. + +If the target contains ISPC source files, this specifies the header suffix to +be used for the generated headers. + +The default value is ``_ispc.h``. diff --git a/Help/release/3.19.rst b/Help/release/3.19.rst index 4f26058..60a8ecc 100644 --- a/Help/release/3.19.rst +++ b/Help/release/3.19.rst @@ -381,3 +381,7 @@ Changes made since CMake 3.19.0 include the following. the invoking process tree, the :variable:`CMAKE_APPLE_SILICON_PROCESSOR` variable or :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment variable may be set to specify a host architecture explicitly. + +* The :variable:`CMAKE_ISPC_HEADER_SUFFIX` variable and corresponding + :prop_tgt:`ISPC_HEADER_SUFFIX` target property were added to control + the header suffix used by ``ISPC`` compiler generated headers. diff --git a/Help/variable/CMAKE_ISPC_HEADER_SUFFIX.rst b/Help/variable/CMAKE_ISPC_HEADER_SUFFIX.rst new file mode 100644 index 0000000..c9fb709 --- /dev/null +++ b/Help/variable/CMAKE_ISPC_HEADER_SUFFIX.rst @@ -0,0 +1,10 @@ +CMAKE_ISPC_HEADER_SUFFIX +------------------------ + +.. versionadded:: 3.19.2 + +Output suffix to be used for ISPC generated headers. + +This variable is used to initialize the :prop_tgt:`ISPC_HEADER_SUFFIX` +property on all the targets. See the target property for additional +information. diff --git a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in index 662900d..dc04e54 100644 --- a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in +++ b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in @@ -9,13 +9,6 @@ # The variable CVF_VERSION must be set before calling configure_file(). -if (PACKAGE_FIND_VERSION_RANGE) - message(AUTHOR_WARNING - "`find_package()` specify a version range but the version strategy " - "(SameMajorVersion) of the module `${PACKAGE_FIND_NAME}` is incompatible " - "with this request. Only the lower endpoint of the range will be used.") -endif() - set(PACKAGE_VERSION "@CVF_VERSION@") if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) @@ -28,14 +21,30 @@ else() set(CVF_VERSION_MAJOR "@CVF_VERSION@") endif() - if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) - set(PACKAGE_VERSION_COMPATIBLE TRUE) + if(PACKAGE_FIND_VERSION_RANGE) + # both endpoints of the range must have the expected major version + math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1") + if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() else() - set(PACKAGE_VERSION_COMPATIBLE FALSE) - endif() + if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) set(PACKAGE_VERSION_EXACT TRUE) + endif() endif() endif() diff --git a/Modules/BasicConfigVersion-SameMinorVersion.cmake.in b/Modules/BasicConfigVersion-SameMinorVersion.cmake.in index bddf4ce..9bb2efc 100644 --- a/Modules/BasicConfigVersion-SameMinorVersion.cmake.in +++ b/Modules/BasicConfigVersion-SameMinorVersion.cmake.in @@ -10,13 +10,6 @@ # The variable CVF_VERSION must be set before calling configure_file(). -if (PACKAGE_FIND_VERSION_RANGE) - message(AUTHOR_WARNING - "`find_package()` specify a version range but the version strategy " - "(SameMinorVersion) of the module `${PACKAGE_FIND_NAME}` is incompatible " - "with this request. Only the lower endpoint of the range will be used.") -endif() - set(PACKAGE_VERSION "@CVF_VERSION@") if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) @@ -31,15 +24,36 @@ else() set(CVF_VERSION_MINOR "") endif() - if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND - (PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR)) - set(PACKAGE_VERSION_COMPATIBLE TRUE) + if(PACKAGE_FIND_VERSION_RANGE) + # both endpoints of the range must have the expected major and minor versions + math (EXPR CVF_VERSION_MINOR_NEXT "${CVF_VERSION_MINOR} + 1") + if (NOT (PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + AND PACKAGE_FIND_VERSION_MIN_MINOR STREQUAL CVF_VERSION_MINOR) + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" + AND NOT (PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR + AND PACKAGE_FIND_VERSION_MAX_MINOR STREQUAL CVF_VERSION_MINOR)) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" + AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL ${CVF_VERSION_MAJOR}.${CVF_VERSION_MINOR_NEXT}))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + AND PACKAGE_FIND_VERSION_MIN_MINOR STREQUAL CVF_VERSION_MINOR + AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() else() - set(PACKAGE_VERSION_COMPATIBLE FALSE) - endif() + if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND + (PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR)) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) set(PACKAGE_VERSION_EXACT TRUE) + endif() endif() endif() diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 372e9f4..ad719ef 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -177,9 +177,10 @@ macro. packages with no binaries. .. versionadded:: 3.19 - ``COMPATIBILITY_MODE`` ``AnyNewerVersion`` handles the version range - if any is specified (see :command:`find_package` command for the details). - All other modes are incompatible with version ranges and will display an + ``COMPATIBILITY_MODE`` ``AnyNewerVersion``, ``SameMajorVersion`` and + ``SameMinorVersion`` 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. Internally, this macro executes :command:`configure_file()` to create the diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index be29d65..b9a94b1 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 19) -set(CMake_VERSION_PATCH 20201214) +set(CMake_VERSION_PATCH 20201215) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index b7f08d2..1f99043 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -191,8 +191,7 @@ bool HandleVersionMode(std::vector<std::string> const& args, return false; } - status.GetMakefile().SetPolicyVersion(version_min, version_max); - return true; + return status.GetMakefile().SetPolicyVersion(version_min, version_max); } bool HandleGetWarningMode(std::vector<std::string> const& args, diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 77a6d4b..6672aa6 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -201,6 +201,7 @@ std::string const kCMAKE_CUDA_ARCHITECTURES = "CMAKE_CUDA_ARCHITECTURES"; std::string const kCMAKE_CUDA_RUNTIME_LIBRARY = "CMAKE_CUDA_RUNTIME_LIBRARY"; std::string const kCMAKE_ENABLE_EXPORTS = "CMAKE_ENABLE_EXPORTS"; std::string const kCMAKE_ISPC_INSTRUCTION_SETS = "CMAKE_ISPC_INSTRUCTION_SETS"; +std::string const kCMAKE_ISPC_HEADER_SUFFIX = "CMAKE_ISPC_HEADER_SUFFIX"; std::string const kCMAKE_LINK_SEARCH_END_STATIC = "CMAKE_LINK_SEARCH_END_STATIC"; std::string const kCMAKE_LINK_SEARCH_START_STATIC = @@ -718,6 +719,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, vars.insert(kCMAKE_CUDA_RUNTIME_LIBRARY); vars.insert(kCMAKE_ENABLE_EXPORTS); vars.insert(kCMAKE_ISPC_INSTRUCTION_SETS); + vars.insert(kCMAKE_ISPC_HEADER_SUFFIX); vars.insert(kCMAKE_LINK_SEARCH_END_STATIC); vars.insert(kCMAKE_LINK_SEARCH_START_STATIC); vars.insert(kCMAKE_OSX_ARCHITECTURES); diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index cd440ad..9467c03 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2946,17 +2946,60 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args, bool HandleConfigureCommand(std::vector<std::string> const& args, cmExecutionStatus& status) { - if (args.size() < 5) { - status.SetError("Incorrect arguments to CONFIGURE subcommand."); + struct Arguments + { + std::string Output; + std::string Content; + bool EscapeQuotes = false; + bool AtOnly = false; + std::string NewlineStyle; + }; + + static auto const parser = + cmArgumentParser<Arguments>{} + .Bind("OUTPUT"_s, &Arguments::Output) + .Bind("CONTENT"_s, &Arguments::Content) + .Bind("ESCAPE_QUOTES"_s, &Arguments::EscapeQuotes) + .Bind("@ONLY"_s, &Arguments::AtOnly) + .Bind("NEWLINE_STYLE"_s, &Arguments::NewlineStyle); + + std::vector<std::string> unrecognizedArguments; + std::vector<std::string> keywordsMissingArguments; + std::vector<std::string> parsedKeywords; + auto parsedArgs = + parser.Parse(cmMakeRange(args).advance(1), &unrecognizedArguments, + &keywordsMissingArguments, &parsedKeywords); + + auto argIt = unrecognizedArguments.begin(); + if (argIt != unrecognizedArguments.end()) { + status.SetError( + cmStrCat("CONFIGURE Unrecognized argument: \"", *argIt, "\"")); + cmSystemTools::SetFatalErrorOccured(); return false; } - if (args[1] != "OUTPUT") { - status.SetError("Incorrect arguments to CONFIGURE subcommand."); - return false; + + std::vector<std::string> mandatoryOptions{ "OUTPUT", "CONTENT" }; + for (auto const& e : mandatoryOptions) { + const bool optionHasNoValue = + std::find(keywordsMissingArguments.begin(), + keywordsMissingArguments.end(), + e) != keywordsMissingArguments.end(); + if (optionHasNoValue) { + status.SetError(cmStrCat("CONFIGURE ", e, " option needs a value.")); + cmSystemTools::SetFatalErrorOccured(); + return false; + } } - if (args[3] != "CONTENT") { - status.SetError("Incorrect arguments to CONFIGURE subcommand."); - return false; + + for (auto const& e : mandatoryOptions) { + const bool optionGiven = + std::find(parsedKeywords.begin(), parsedKeywords.end(), e) != + parsedKeywords.end(); + if (!optionGiven) { + status.SetError(cmStrCat("CONFIGURE ", e, " option is mandatory.")); + cmSystemTools::SetFatalErrorOccured(); + return false; + } } std::string errorMessage; @@ -2966,28 +3009,9 @@ bool HandleConfigureCommand(std::vector<std::string> const& args, return false; } - bool escapeQuotes = false; - bool atOnly = false; - for (unsigned int i = 5; i < args.size(); ++i) { - if (args[i] == "@ONLY") { - atOnly = true; - } else if (args[i] == "ESCAPE_QUOTES") { - escapeQuotes = true; - } else if (args[i] == "NEWLINE_STYLE" || args[i] == "LF" || - args[i] == "UNIX" || args[i] == "CRLF" || args[i] == "WIN32" || - args[i] == "DOS") { - /* Options handled by NewLineStyle member above. */ - } else { - status.SetError( - cmStrCat("CONFIGURE Unrecognized argument \"", args[i], "\"")); - return false; - } - } - // Check for generator expressions - const std::string input = args[4]; std::string outputFile = cmSystemTools::CollapseFullPath( - args[2], status.GetMakefile().GetCurrentBinaryDirectory()); + parsedArgs.Output, status.GetMakefile().GetCurrentBinaryDirectory()); std::string::size_type pos = outputFile.find_first_of("<>"); if (pos != std::string::npos) { @@ -3036,12 +3060,13 @@ bool HandleConfigureCommand(std::vector<std::string> const& args, fout.SetCopyIfDifferent(true); // copy input to output and expand variables from input at the same time - std::stringstream sin(input, std::ios::in); + std::stringstream sin(parsedArgs.Content, std::ios::in); std::string inLine; std::string outLine; while (cmSystemTools::GetLineFromStream(sin, inLine)) { outLine.clear(); - makeFile.ConfigureString(inLine, outLine, atOnly, escapeQuotes); + makeFile.ConfigureString(inLine, outLine, parsedArgs.AtOnly, + parsedArgs.EscapeQuotes); fout << outLine << newLineCharacters; } diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 4147ba8..ef80632 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -582,18 +582,9 @@ void cmGlobalNinjaGenerator::CleanMetaData() // Skip some ninja tools if they need 'build.ninja' but it is missing. bool const missingBuildManifest = expectBuildManifest && - (this->NinjaSupportsCleanDeadTool || - this->NinjaSupportsUnconditionalRecompactTool) && + this->NinjaSupportsUnconditionalRecompactTool && !cmSystemTools::FileExists("build.ninja"); - // The `cleandead` tool needs to know about all outputs in the build we just - // wrote out. Ninja-Multi doesn't have a single `build.ninja` we can use that - // is the union of all generated configurations, so we can't run it reliably - // in that case. - if (this->NinjaSupportsCleanDeadTool && !this->DisableCleandead && - expectBuildManifest && !missingBuildManifest) { - run_ninja_tool({ "cleandead" }); - } // The `recompact` tool loads the manifest. As above, we don't have a single // `build.ninja` to load for this in Ninja-Multi. This may be relaxed in the // future pending further investigation into how Ninja works upstream @@ -680,9 +671,6 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures() } } } - this->NinjaSupportsCleanDeadTool = !cmSystemTools::VersionCompare( - cmSystemTools::OP_LESS, this->NinjaVersion.c_str(), - RequiredNinjaVersionForCleanDeadTool().c_str()); this->NinjaSupportsUnconditionalRecompactTool = !cmSystemTools::VersionCompare( cmSystemTools::OP_LESS, this->NinjaVersion.c_str(), diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 8df0372..9344c4d 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -372,7 +372,6 @@ public: { return "1.10"; } - static std::string RequiredNinjaVersionForCleanDeadTool() { return "1.10"; } static std::string RequiredNinjaVersionForMultipleOutputs() { return "1.10"; @@ -544,7 +543,6 @@ private: bool NinjaSupportsDyndeps = false; bool NinjaSupportsRestatTool = false; bool NinjaSupportsUnconditionalRecompactTool = false; - bool NinjaSupportsCleanDeadTool = false; bool NinjaSupportsMultipleOutputs = false; bool NinjaSupportsMetadataOnRegeneration = false; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9f9d725..7b1c531 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1940,9 +1940,11 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags, this->AddConfigVariableFlags(flags, cmStrCat("CMAKE_", lang, "_FLAGS"), config); - std::string const& compiler = this->Makefile->GetSafeDefinition( + std::string compiler = this->Makefile->GetSafeDefinition( cmStrCat("CMAKE_", lang, "_COMPILER_ID")); + std::string compilerSimulateId = this->Makefile->GetSafeDefinition( + cmStrCat("CMAKE_", lang, "_SIMULATE_ID")); if (lang == "Swift") { if (cmProp v = target->GetProperty("Swift_LANGUAGE_VERSION")) { if (cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER_EQUAL, @@ -1957,14 +1959,24 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags, target->AddCUDAToolkitFlags(flags); } else if (lang == "ISPC") { target->AddISPCTargetFlags(flags); + } else if (lang == "RC" && + this->Makefile->GetSafeDefinition("CMAKE_RC_COMPILER") + .find("llvm-rc") != std::string::npos) { + compiler = this->Makefile->GetSafeDefinition("CMAKE_C_COMPILER_ID"); + if (!compiler.empty()) { + compilerSimulateId = + this->Makefile->GetSafeDefinition("CMAKE_C_SIMULATE_ID"); + } else { + compiler = this->Makefile->GetSafeDefinition("CMAKE_CXX_COMPILER_ID"); + compilerSimulateId = + this->Makefile->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID"); + } } + // Add VFS Overlay for Clang compiliers if (compiler == "Clang") { if (cmProp vfsOverlay = this->Makefile->GetDefinition("CMAKE_CLANG_VFS_OVERLAY")) { - std::string const& compilerSimulateId = - this->Makefile->GetSafeDefinition( - cmStrCat("CMAKE_", lang, "_SIMULATE_ID")); if (compilerSimulateId == "MSVC") { this->AppendCompileOptions( flags, @@ -2426,9 +2438,12 @@ void cmLocalGenerator::AddISPCDependencies(cmGeneratorTarget* target) return; } - std::vector<std::string> ispcSuffixes = + cmProp ispcHeaderSuffixProp = target->GetProperty("ISPC_HEADER_SUFFIX"); + assert(ispcHeaderSuffixProp != nullptr); + + std::vector<std::string> ispcArchSuffixes = detail::ComputeISPCObjectSuffixes(target); - const bool extra_objects = (ispcSuffixes.size() > 1); + const bool extra_objects = (ispcArchSuffixes.size() > 1); std::vector<std::string> configsList = this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig); @@ -2451,14 +2466,19 @@ void cmLocalGenerator::AddISPCDependencies(cmGeneratorTarget* target) const std::string& lang = sf->GetLanguage(); if (lang == "ISPC") { std::string const& objectName = target->GetObjectName(sf); + + // Drop both ".obj" and the source file extension std::string ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(objectName); + ispcSource = + cmSystemTools::GetFilenameWithoutLastExtension(ispcSource); - auto headerPath = cmStrCat(headerDir, '/', ispcSource, ".h"); + auto headerPath = + cmStrCat(headerDir, '/', ispcSource, *ispcHeaderSuffixProp); target->AddISPCGeneratedHeader(headerPath, config); if (extra_objects) { std::vector<std::string> objs = detail::ComputeISPCExtraObjects( - objectName, rootObjectDir, ispcSuffixes); + objectName, rootObjectDir, ispcArchSuffixes); target->AddISPCGeneratedObject(std::move(objs), config); } } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index ee47e46..1f23424 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -644,6 +644,11 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles( if (lang == "ISPC") { std::string ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(objectName); + ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(ispcSource); + + cmProp ispcSuffixProp = + this->GeneratorTarget->GetProperty("ISPC_HEADER_SUFFIX"); + assert(ispcSuffixProp != nullptr); std::string directory = this->GeneratorTarget->GetObjectDirectory(config); if (cmProp prop = @@ -651,7 +656,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles( directory = cmStrCat(this->LocalGenerator->GetBinaryDirectory(), '/', *prop); } - ispcHeaderRelative = cmStrCat(directory, '/', ispcSource, ".h"); + ispcHeaderRelative = cmStrCat(directory, '/', ispcSource, *ispcSuffixProp); ispcHeaderForShell = this->LocalGenerator->ConvertToOutputFormat( ispcHeaderRelative, cmOutputConverter::SHELL); } diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 838cf4c..9075563 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -1356,6 +1356,11 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( this->GeneratorTarget->GetObjectName(source); std::string ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(objectName); + ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(ispcSource); + + cmProp ispcSuffixProp = + this->GeneratorTarget->GetProperty("ISPC_HEADER_SUFFIX"); + assert(ispcSuffixProp != nullptr); std::string ispcHeaderDirectory = this->GeneratorTarget->GetObjectDirectory(config); @@ -1366,7 +1371,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( } std::string ispcHeader = - cmStrCat(ispcHeaderDirectory, '/', ispcSource, ".h"); + cmStrCat(ispcHeaderDirectory, '/', ispcSource, *ispcSuffixProp); ispcHeader = this->ConvertToNinjaPath(ispcHeader); // Make sure ninja knows what command generates the header diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9db5dc6..778fb89 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -369,6 +369,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, initProp("JOB_POOL_PRECOMPILE_HEADER"); initProp("ISPC_COMPILER_LAUNCHER"); initProp("ISPC_HEADER_DIRECTORY"); + initPropValue("ISPC_HEADER_SUFFIX", "_ispc.h"); initProp("ISPC_INSTRUCTION_SETS"); initProp("LINK_SEARCH_START_STATIC"); initProp("LINK_SEARCH_END_STATIC"); diff --git a/Tests/ISPC/CMakeLists.txt b/Tests/ISPC/CMakeLists.txt index 2c3651d..c993275 100644 --- a/Tests/ISPC/CMakeLists.txt +++ b/Tests/ISPC/CMakeLists.txt @@ -7,6 +7,7 @@ macro (add_ispc_test_macro name) endmacro () add_ispc_test_macro(ISPC.ChainedStaticLibraries ISPCChainedStaticLibraries) +add_ispc_test_macro(ISPC.CustomHeaderSuffix ISPCCustomHeaderSuffix) add_ispc_test_macro(ISPC.Defines ISPCDefines) add_ispc_test_macro(ISPC.DynamicLibrary ISPCDynamicLibrary) add_ispc_test_macro(ISPC.ObjectGenex ISPCObjectGenex) diff --git a/Tests/ISPC/ChainedStaticLibraries/extra.cxx b/Tests/ISPC/ChainedStaticLibraries/extra.cxx index 88ef3a7..9f50df4 100644 --- a/Tests/ISPC/ChainedStaticLibraries/extra.cxx +++ b/Tests/ISPC/ChainedStaticLibraries/extra.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "extra.ispc.h" +#include "extra_ispc.h" int extra() { diff --git a/Tests/ISPC/ChainedStaticLibraries/main.cxx b/Tests/ISPC/ChainedStaticLibraries/main.cxx index 4f1c9be..a6b91a6 100644 --- a/Tests/ISPC/ChainedStaticLibraries/main.cxx +++ b/Tests/ISPC/ChainedStaticLibraries/main.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "simple.ispc.h" +#include "simple_ispc.h" int main() { diff --git a/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt b/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt new file mode 100644 index 0000000..d20f88e --- /dev/null +++ b/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt @@ -0,0 +1,23 @@ + +cmake_minimum_required(VERSION 3.18) +project(ISPCCustomHeaderSuffix CXX ISPC) + +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(CMAKE_ISPC_FLAGS "--arch=x86") +endif() + +set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i8x16") + +set(CMAKE_ISPC_HEADER_SUFFIX ".ispc.h") + +add_library(ispc_suffix_1 OBJECT simple.ispc) +add_library(ispc_suffix_2 OBJECT extra.ispc) + +set_target_properties(ispc_suffix_2 PROPERTIES ISPC_HEADER_SUFFIX "___ispc.h") + +set_target_properties(ispc_suffix_1 ispc_suffix_2 + PROPERTIES POSITION_INDEPENDENT_CODE ON +) + +add_executable(ISPCCustomHeaderSuffix main.cxx extra.cxx) +target_link_libraries(ISPCCustomHeaderSuffix PRIVATE ispc_suffix_1 ispc_suffix_2) diff --git a/Tests/ISPC/CustomHeaderSuffix/extra.cxx b/Tests/ISPC/CustomHeaderSuffix/extra.cxx new file mode 100644 index 0000000..0354e2d --- /dev/null +++ b/Tests/ISPC/CustomHeaderSuffix/extra.cxx @@ -0,0 +1,17 @@ +#include <stdio.h> + +#include "extra___ispc.h" + +int extra() +{ + float vin[16], vout[16]; + for (int i = 0; i < 16; ++i) + vin[i] = i; + + ispc::extra(vin, vout, 16); + + for (int i = 0; i < 16; ++i) + printf("%d: extra(%f) = %f\n", i, vin[i], vout[i]); + + return 0; +} diff --git a/Tests/ISPC/CustomHeaderSuffix/extra.ispc b/Tests/ISPC/CustomHeaderSuffix/extra.ispc new file mode 100644 index 0000000..5a4a442 --- /dev/null +++ b/Tests/ISPC/CustomHeaderSuffix/extra.ispc @@ -0,0 +1,12 @@ + +export void extra(uniform float vin[], uniform float vout[], + uniform int count) { + foreach (index = 0 ... count) { + float v = vin[index]; + if (v < 3.) + v = v * v; + else + v = sqrt(v); + vout[index] = v; + } +} diff --git a/Tests/ISPC/CustomHeaderSuffix/main.cxx b/Tests/ISPC/CustomHeaderSuffix/main.cxx new file mode 100644 index 0000000..4f1c9be --- /dev/null +++ b/Tests/ISPC/CustomHeaderSuffix/main.cxx @@ -0,0 +1,15 @@ +#include <stdio.h> + +#include "simple.ispc.h" + +int main() +{ + float vin[16], vout[16]; + for (int i = 0; i < 16; ++i) + vin[i] = i; + + ispc::simple(vin, vout, 16); + + for (int i = 0; i < 16; ++i) + printf("%d: simple(%f) = %f\n", i, vin[i], vout[i]); +} diff --git a/Tests/ISPC/CustomHeaderSuffix/simple.ispc b/Tests/ISPC/CustomHeaderSuffix/simple.ispc new file mode 100644 index 0000000..70cb588 --- /dev/null +++ b/Tests/ISPC/CustomHeaderSuffix/simple.ispc @@ -0,0 +1,12 @@ + +export void simple(uniform float vin[], uniform float vout[], + uniform int count) { + foreach (index = 0 ... count) { + float v = vin[index]; + if (v < 3.) + v = v * v; + else + v = sqrt(v); + vout[index] = v; + } +} diff --git a/Tests/ISPC/Defines/main.cxx b/Tests/ISPC/Defines/main.cxx index 4f1c9be..a6b91a6 100644 --- a/Tests/ISPC/Defines/main.cxx +++ b/Tests/ISPC/Defines/main.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "simple.ispc.h" +#include "simple_ispc.h" int main() { diff --git a/Tests/ISPC/DynamicLibrary/extra.cxx b/Tests/ISPC/DynamicLibrary/extra.cxx index b3623d1..a3d89ed 100644 --- a/Tests/ISPC/DynamicLibrary/extra.cxx +++ b/Tests/ISPC/DynamicLibrary/extra.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "extra.ispc.h" +#include "extra_ispc.h" #ifdef _WIN32 # define EXPORT __declspec(dllexport) diff --git a/Tests/ISPC/DynamicLibrary/simple.cxx b/Tests/ISPC/DynamicLibrary/simple.cxx index cb5a779..bc78bda 100644 --- a/Tests/ISPC/DynamicLibrary/simple.cxx +++ b/Tests/ISPC/DynamicLibrary/simple.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "simple.ispc.h" +#include "simple_ispc.h" #ifdef _WIN32 # define EXPORT __declspec(dllexport) diff --git a/Tests/ISPC/ObjectLibrary/extra.cxx b/Tests/ISPC/ObjectLibrary/extra.cxx index 88ef3a7..9f50df4 100644 --- a/Tests/ISPC/ObjectLibrary/extra.cxx +++ b/Tests/ISPC/ObjectLibrary/extra.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "extra.ispc.h" +#include "extra_ispc.h" int extra() { diff --git a/Tests/ISPC/ObjectLibrary/main.cxx b/Tests/ISPC/ObjectLibrary/main.cxx index 4f1c9be..a6b91a6 100644 --- a/Tests/ISPC/ObjectLibrary/main.cxx +++ b/Tests/ISPC/ObjectLibrary/main.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "simple.ispc.h" +#include "simple_ispc.h" int main() { diff --git a/Tests/ISPC/ResponseAndDefine/main.cxx b/Tests/ISPC/ResponseAndDefine/main.cxx index 4f1c9be..a6b91a6 100644 --- a/Tests/ISPC/ResponseAndDefine/main.cxx +++ b/Tests/ISPC/ResponseAndDefine/main.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "simple.ispc.h" +#include "simple_ispc.h" int main() { diff --git a/Tests/ISPC/StaticLibrary/main.cxx b/Tests/ISPC/StaticLibrary/main.cxx index 4f1c9be..a6b91a6 100644 --- a/Tests/ISPC/StaticLibrary/main.cxx +++ b/Tests/ISPC/StaticLibrary/main.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "simple.ispc.h" +#include "simple_ispc.h" int main() { diff --git a/Tests/ISPC/SystemIncludes/CMakeLists.txt b/Tests/ISPC/SystemIncludes/CMakeLists.txt index 95959b2..d94e75e 100644 --- a/Tests/ISPC/SystemIncludes/CMakeLists.txt +++ b/Tests/ISPC/SystemIncludes/CMakeLists.txt @@ -4,8 +4,10 @@ project(ispc_spaces_in_path ISPC CXX) add_executable(ISPCSystemIncludes main.cxx simple.ispc) set_target_properties(ISPCSystemIncludes PROPERTIES POSITION_INDEPENDENT_CODE ON) +set_target_properties(ISPCSystemIncludes PROPERTIES ISPC_HEADER_SUFFIX ".ispc.h") target_include_directories(ISPCSystemIncludes SYSTEM PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") + target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>") if(CMAKE_SIZEOF_VOID_P EQUAL 4) target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>") diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index c0e4bce..540a718 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -288,6 +288,7 @@ add_RunCMake_test(ToolchainFile) add_RunCMake_test(find_dependency) add_RunCMake_test(CompileDefinitions) add_RunCMake_test(CompileFeatures) +add_RunCMake_test(Policy) add_RunCMake_test(PolicyScope) add_RunCMake_test(WriteBasicConfigVersionFile) add_RunCMake_test(WriteCompilerDetectionHeader) diff --git a/Tests/RunCMake/File_Configure/AtOnly.cmake b/Tests/RunCMake/File_Configure/AtOnly.cmake new file mode 100644 index 0000000..cc5304a --- /dev/null +++ b/Tests/RunCMake/File_Configure/AtOnly.cmake @@ -0,0 +1,12 @@ +set(file_name ${CMAKE_CURRENT_BINARY_DIR}/atonly.txt) +set(var_a "a") +set(var_b "b") +file(CONFIGURE + OUTPUT ${file_name} + CONTENT "-->@var_a@<-- -->${var_b}<--" + @ONLY +) +file(READ ${file_name} file_content) +if(NOT file_content STREQUAL "-->a<-- -->${var_b}<--") + message(FATAL_ERROR "@ONLY doesn't work") +endif() diff --git a/Tests/RunCMake/File_Configure/BadArg-stderr.txt b/Tests/RunCMake/File_Configure/BadArg-stderr.txt deleted file mode 100644 index 5423a28..0000000 --- a/Tests/RunCMake/File_Configure/BadArg-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Error at BadArg.cmake:[0-9]+ \(file\): - file Incorrect arguments to CONFIGURE subcommand. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/File_Configure/BadArgContent-result.txt b/Tests/RunCMake/File_Configure/BadArgContent-result.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/File_Configure/BadArgContent-result.txt diff --git a/Tests/RunCMake/File_Configure/BadArgContent-stderr.txt b/Tests/RunCMake/File_Configure/BadArgContent-stderr.txt new file mode 100644 index 0000000..a6ea314 --- /dev/null +++ b/Tests/RunCMake/File_Configure/BadArgContent-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at BadArgContent.cmake:[0-9]+ \(file\): + file CONFIGURE CONTENT option needs a value. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/File_Configure/BadArgContent.cmake b/Tests/RunCMake/File_Configure/BadArgContent.cmake new file mode 100644 index 0000000..282dc18 --- /dev/null +++ b/Tests/RunCMake/File_Configure/BadArgContent.cmake @@ -0,0 +1 @@ +file(CONFIGURE CONTENT) diff --git a/Tests/RunCMake/File_Configure/BadArg-result.txt b/Tests/RunCMake/File_Configure/BadArgOutput-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/File_Configure/BadArg-result.txt +++ b/Tests/RunCMake/File_Configure/BadArgOutput-result.txt diff --git a/Tests/RunCMake/File_Configure/BadArgOutput-stderr.txt b/Tests/RunCMake/File_Configure/BadArgOutput-stderr.txt new file mode 100644 index 0000000..b5a924c --- /dev/null +++ b/Tests/RunCMake/File_Configure/BadArgOutput-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at BadArgOutput.cmake:[0-9]+ \(file\): + file CONFIGURE OUTPUT option needs a value. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/File_Configure/BadArg.cmake b/Tests/RunCMake/File_Configure/BadArgOutput.cmake index 7c7fcda..7c7fcda 100644 --- a/Tests/RunCMake/File_Configure/BadArg.cmake +++ b/Tests/RunCMake/File_Configure/BadArgOutput.cmake diff --git a/Tests/RunCMake/File_Configure/EscapeQuotes.cmake b/Tests/RunCMake/File_Configure/EscapeQuotes.cmake new file mode 100644 index 0000000..1136c87 --- /dev/null +++ b/Tests/RunCMake/File_Configure/EscapeQuotes.cmake @@ -0,0 +1,12 @@ +set(file_name ${CMAKE_CURRENT_BINARY_DIR}/escape_quotes.txt) +set(var "\t") +set(ref "${var}") +file(CONFIGURE + CONTENT "-->@ref@<--" + OUTPUT ${file_name} + ESCAPE_QUOTES +) +file(READ ${file_name} file_content) +if(NOT file_content MATCHES "^-->\t<--$") + message(FATAL_ERROR "ESCAPE_QUOTES doesn't work") +endif() diff --git a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake index e79de79..5022985 100644 --- a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake +++ b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake @@ -1,10 +1,14 @@ include(RunCMake) run_cmake(AngleBracketsContent) -run_cmake(BadArg) +run_cmake(BadArgOutput) +run_cmake(BadArgContent) run_cmake(BadArgGeneratorExpressionOutput) +run_cmake(UnrecognizedArgs) run_cmake(DirOutput) run_cmake(NewLineStyle-NoArg) run_cmake(NewLineStyle-ValidArg) run_cmake(NewLineStyle-WrongArg) run_cmake(SubDir) +run_cmake(AtOnly) +run_cmake(EscapeQuotes) diff --git a/Tests/RunCMake/File_Configure/UnrecognizedArgs-result.txt b/Tests/RunCMake/File_Configure/UnrecognizedArgs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/File_Configure/UnrecognizedArgs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/File_Configure/UnrecognizedArgs-stderr.txt b/Tests/RunCMake/File_Configure/UnrecognizedArgs-stderr.txt new file mode 100644 index 0000000..1dd1a20 --- /dev/null +++ b/Tests/RunCMake/File_Configure/UnrecognizedArgs-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at UnrecognizedArgs.cmake:[0-9]+ \(file\): + file CONFIGURE Unrecognized argument: "INPUT" +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/File_Configure/UnrecognizedArgs.cmake b/Tests/RunCMake/File_Configure/UnrecognizedArgs.cmake new file mode 100644 index 0000000..93ea7b5 --- /dev/null +++ b/Tests/RunCMake/File_Configure/UnrecognizedArgs.cmake @@ -0,0 +1 @@ +file(CONFIGURE INPUT) diff --git a/Tests/RunCMake/Policy/CMakeLists.txt b/Tests/RunCMake/Policy/CMakeLists.txt new file mode 100644 index 0000000..667561e --- /dev/null +++ b/Tests/RunCMake/Policy/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.12) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/Policy/InvalidMaxVersion-result.txt b/Tests/RunCMake/Policy/InvalidMaxVersion-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidMaxVersion-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Policy/InvalidMaxVersion-stderr.txt b/Tests/RunCMake/Policy/InvalidMaxVersion-stderr.txt new file mode 100644 index 0000000..25d22f5 --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidMaxVersion-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at InvalidMaxVersion.cmake:[0-9]+ \(cmake_policy\): + Invalid policy max version value "[A-Za-z0-9]+.[A-Za-z0-9]*.[A-Za-z0-9]*.[A-Za-z0-9]*"\. A numeric + major.minor\[\.patch\[\.tweak\]\] must be given\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/InvalidMaxVersion.cmake b/Tests/RunCMake/Policy/InvalidMaxVersion.cmake new file mode 100644 index 0000000..be3270f --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidMaxVersion.cmake @@ -0,0 +1,5 @@ +if(NOT version) + message(SEND_ERROR "Vesrion string is empty: ${version}") +endif() + +cmake_policy(VERSION 3.1...${version}) diff --git a/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven-result.txt b/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven-result.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven-result.txt diff --git a/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven-stderr.txt b/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven-stderr.txt new file mode 100644 index 0000000..a48feb3 --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at InvalidRangeMaxVersionNotGiven.cmake:[0-9]+ \(cmake_policy\): + cmake_policy VERSION "3.15..." does not have a version on both sides of + "...". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven.cmake b/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven.cmake new file mode 100644 index 0000000..e55803c --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidRangeMaxVersionNotGiven.cmake @@ -0,0 +1 @@ +cmake_policy(VERSION 3.15...) diff --git a/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven-result.txt b/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven-stderr.txt b/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven-stderr.txt new file mode 100644 index 0000000..84e9b88 --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at InvalidRangeMinVersionNotGiven.cmake:[0-9]+ \(cmake_policy\): + cmake_policy VERSION "...3.15" does not have a version on both sides of + "...". +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven.cmake b/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven.cmake new file mode 100644 index 0000000..60e7e25 --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidRangeMinVersionNotGiven.cmake @@ -0,0 +1 @@ +cmake_policy(VERSION ...3.15) diff --git a/Tests/RunCMake/Policy/InvalidVersion-result.txt b/Tests/RunCMake/Policy/InvalidVersion-result.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidVersion-result.txt diff --git a/Tests/RunCMake/Policy/InvalidVersion-stderr.txt b/Tests/RunCMake/Policy/InvalidVersion-stderr.txt new file mode 100644 index 0000000..783f4ed --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidVersion-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at InvalidVersion.cmake:[0-9]+ \(cmake_policy\): + Invalid policy version value "[A-Za-z0-9]+.[A-Za-z0-9]*.[A-Za-z0-9]*.[A-Za-z0-9]*"\. A numeric + major\.minor\[\.patch\[\.tweak\]\] must be given\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/InvalidVersion.cmake b/Tests/RunCMake/Policy/InvalidVersion.cmake new file mode 100644 index 0000000..b135ba6 --- /dev/null +++ b/Tests/RunCMake/Policy/InvalidVersion.cmake @@ -0,0 +1,5 @@ +if(NOT version) + message(SEND_ERROR "Vesrion string is empty: ${version}") +endif() + +cmake_policy(VERSION ${version}) diff --git a/Tests/RunCMake/Policy/MinVersionLargerThanMax-result.txt b/Tests/RunCMake/Policy/MinVersionLargerThanMax-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Policy/MinVersionLargerThanMax-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Policy/MinVersionLargerThanMax-stderr.txt b/Tests/RunCMake/Policy/MinVersionLargerThanMax-stderr.txt new file mode 100644 index 0000000..0b0308f --- /dev/null +++ b/Tests/RunCMake/Policy/MinVersionLargerThanMax-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at MinVersionLargerThanMax.cmake:[0-9]+ \(cmake_policy\): + Policy VERSION range "3.12...3.8" specifies a larger minimum than maximum. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/MinVersionLargerThanMax.cmake b/Tests/RunCMake/Policy/MinVersionLargerThanMax.cmake new file mode 100644 index 0000000..67d5f85 --- /dev/null +++ b/Tests/RunCMake/Policy/MinVersionLargerThanMax.cmake @@ -0,0 +1 @@ +cmake_policy(VERSION 3.12...3.8) diff --git a/Tests/RunCMake/Policy/RunCMakeTest.cmake b/Tests/RunCMake/Policy/RunCMakeTest.cmake new file mode 100644 index 0000000..74c7d63 --- /dev/null +++ b/Tests/RunCMake/Policy/RunCMakeTest.cmake @@ -0,0 +1,19 @@ +include(RunCMake) + +run_cmake(VersionNotGiven) +run_cmake(TooManyVersionsGiven) +run_cmake(InvalidRangeMinVersionNotGiven) +run_cmake(InvalidRangeMaxVersionNotGiven) + +set(RunCMake_TEST_OPTIONS "-Dversion=three") +run_cmake(InvalidVersion) +run_cmake(InvalidMaxVersion) +unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS "-Dversion=3.one") +run_cmake(InvalidVersion) +run_cmake(InvalidMaxVersion) +unset(RunCMake_TEST_OPTIONS) + +run_cmake(VersionLowerThan2_4) +run_cmake(MinVersionLargerThanMax) +run_cmake(VeryHighVersion) diff --git a/Tests/RunCMake/Policy/TooManyVersionsGiven-result.txt b/Tests/RunCMake/Policy/TooManyVersionsGiven-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Policy/TooManyVersionsGiven-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Policy/TooManyVersionsGiven-stderr.txt b/Tests/RunCMake/Policy/TooManyVersionsGiven-stderr.txt new file mode 100644 index 0000000..7a4f8c7 --- /dev/null +++ b/Tests/RunCMake/Policy/TooManyVersionsGiven-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at TooManyVersionsGiven.cmake:[0-9]+ \(cmake_policy\): + cmake_policy VERSION given too many arguments +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/TooManyVersionsGiven.cmake b/Tests/RunCMake/Policy/TooManyVersionsGiven.cmake new file mode 100644 index 0000000..6c99af2 --- /dev/null +++ b/Tests/RunCMake/Policy/TooManyVersionsGiven.cmake @@ -0,0 +1 @@ +cmake_policy(VERSION 1 2 3) diff --git a/Tests/RunCMake/Policy/VersionLowerThan2_4-result.txt b/Tests/RunCMake/Policy/VersionLowerThan2_4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Policy/VersionLowerThan2_4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Policy/VersionLowerThan2_4-stderr.txt b/Tests/RunCMake/Policy/VersionLowerThan2_4-stderr.txt new file mode 100644 index 0000000..3f19192 --- /dev/null +++ b/Tests/RunCMake/Policy/VersionLowerThan2_4-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at VersionLowerThan2_4.cmake:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 2.4 is not supported by CMake >= 3.0. For + compatibility with older versions please use any CMake 2.8.x release or + lower. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/VersionLowerThan2_4.cmake b/Tests/RunCMake/Policy/VersionLowerThan2_4.cmake new file mode 100644 index 0000000..f1a4fd9 --- /dev/null +++ b/Tests/RunCMake/Policy/VersionLowerThan2_4.cmake @@ -0,0 +1 @@ +cmake_policy(VERSION 2.2) diff --git a/Tests/RunCMake/Policy/VersionNotGiven-result.txt b/Tests/RunCMake/Policy/VersionNotGiven-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Policy/VersionNotGiven-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Policy/VersionNotGiven-stderr.txt b/Tests/RunCMake/Policy/VersionNotGiven-stderr.txt new file mode 100644 index 0000000..8eeb177 --- /dev/null +++ b/Tests/RunCMake/Policy/VersionNotGiven-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at VersionNotGiven.cmake:[0-9]+ \(cmake_policy\): + cmake_policy VERSION not given an argument +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/VersionNotGiven.cmake b/Tests/RunCMake/Policy/VersionNotGiven.cmake new file mode 100644 index 0000000..53b3d7f --- /dev/null +++ b/Tests/RunCMake/Policy/VersionNotGiven.cmake @@ -0,0 +1 @@ +cmake_policy(VERSION) diff --git a/Tests/RunCMake/Policy/VeryHighVersion-result.txt b/Tests/RunCMake/Policy/VeryHighVersion-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Policy/VeryHighVersion-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Policy/VeryHighVersion-stderr.txt b/Tests/RunCMake/Policy/VeryHighVersion-stderr.txt new file mode 100644 index 0000000..7cca91b --- /dev/null +++ b/Tests/RunCMake/Policy/VeryHighVersion-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at VeryHighVersion.cmake:[0-9]+ \(cmake_policy\): + An attempt was made to set the policy version of CMake to "99.1" which is + greater than this version of CMake. This is not allowed because the + greater version may have new policies not known to this CMake. You may + need a newer CMake version to build this project. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Policy/VeryHighVersion.cmake b/Tests/RunCMake/Policy/VeryHighVersion.cmake new file mode 100644 index 0000000..3d4af8c --- /dev/null +++ b/Tests/RunCMake/Policy/VeryHighVersion.cmake @@ -0,0 +1 @@ +cmake_policy(VERSION 99.1) diff --git a/Tests/RunCMake/WriteBasicConfigVersionFile/All.cmake b/Tests/RunCMake/WriteBasicConfigVersionFile/All.cmake index 4253652..c32c92d 100644 --- a/Tests/RunCMake/WriteBasicConfigVersionFile/All.cmake +++ b/Tests/RunCMake/WriteBasicConfigVersionFile/All.cmake @@ -3,16 +3,16 @@ set(CMAKE_SIZEOF_VOID_P 4) include(WriteBasicConfigVersionFile) -set(_compatibilities AnyNewerVersion - SameMajorVersion - SameMinorVersion - ExactVersion) +set(COMPATIBILITIES AnyNewerVersion + SameMajorVersion + SameMinorVersion + ExactVersion) function(TEST_WRITE_BASIC_CONFIG_VERSION_FILE_PREPARE _version_installed) set(_same_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P}) set(_no_CMAKE_SIZEOF_VOID_P "") math(EXPR _diff_CMAKE_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P} + 1") - foreach(_compat ${_compatibilities}) + foreach(_compat ${COMPATIBILITIES}) set(_pkg ${_compat}${_version_installed}) string(REPLACE "." "" _pkg ${_pkg}) set(_filename "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}ConfigVersion.cmake") @@ -71,20 +71,58 @@ function(TEST_WRITE_BASIC_CONFIG_VERSION_FILE _version_installed _expected_compatible_SameMajorVersion _expected_compatible_SameMinorVersion _expected_compatible_ExactVersion) - set(PACKAGE_FIND_VERSION ${_version_requested}) - if("${PACKAGE_FIND_VERSION}" MATCHES [[(^([0-9]+)(\.([0-9]+)(\.([0-9]+)(\.([0-9]+))?)?)?)?$]]) - set(PACKAGE_FIND_VERSION_MAJOR "${CMAKE_MATCH_2}") - set(PACKAGE_FIND_VERSION_MINOR "${CMAKE_MATCH_4}") - set(PACKAGE_FIND_VERSION_PATCH "${CMAKE_MATCH_6}") - set(PACKAGE_FIND_VERSION_TWEAK "${CMAKE_MATCH_8}") - else() - message(FATAL_ERROR "_version_requested (${_version_requested}) should be a version number") - endif() - - if ("${_version_installed}" STREQUAL "${_version_requested}") - set(_expected_exact 1) - else() + if("${_version_requested}" MATCHES [[^([0-9]+(\.[0-9]+)*)\.\.\.(<)?([0-9]+(\.[0-9]+)*)$]]) + set (_compatibilities ${COMPATIBILITIES}) + # ExactVersion must not be tested + list(POP_BACK _compatibilities) + set(PACKAGE_FIND_VERSION_RANGE TRUE) + set(PACKAGE_FIND_VERSION_RANGE_MIN INCLUDE) + if ("${CMAKE_MATCH_3}" STREQUAL "<") + set(PACKAGE_FIND_VERSION_RANGE_MAX EXCLUDE) + else() + set(PACKAGE_FIND_VERSION_RANGE_MAX INCLUDE) + endif() + set(PACKAGE_FIND_VERSION_MIN "${CMAKE_MATCH_1}") + set(PACKAGE_FIND_VERSION_MAX "${CMAKE_MATCH_4}") + if("${PACKAGE_FIND_VERSION_MIN}" MATCHES [[(^([0-9]+)(\.([0-9]+)(\.([0-9]+)(\.([0-9]+))?)?)?)?$]]) + set(PACKAGE_FIND_VERSION_MIN_MAJOR "${CMAKE_MATCH_2}") + set(PACKAGE_FIND_VERSION_MIN_MINOR "${CMAKE_MATCH_4}") + set(PACKAGE_FIND_VERSION_MIN_PATCH "${CMAKE_MATCH_6}") + set(PACKAGE_FIND_VERSION_MIN_TWEAK "${CMAKE_MATCH_8}") + else() + message(FATAL_ERROR "_version_requested (${_version_requested}) should be a version range") + endif() + set(PACKAGE_FIND_VERSION "${PACKAGE_FIND_VERSION_MIN}") + set(PACKAGE_FIND_VERSION_MAJOR "${PACKAGE_FIND_VERSION_MIN_MAJOR}") + set(PACKAGE_FIND_VERSION_MINOR "${PACKAGE_FIND_VERSION_MIN_MINOR}") + set(PACKAGE_FIND_VERSION_PATCH "${PACKAGE_FIND_VERSION_MIN_PATCH}") + set(PACKAGE_FIND_VERSION_TWEAK "${PACKAGE_FIND_VERSION_MIN_TWEAK}") + if("${PACKAGE_FIND_VERSION_MAX}" MATCHES [[(^([0-9]+)(\.([0-9]+)(\.([0-9]+)(\.([0-9]+))?)?)?)?$]]) + set(PACKAGE_FIND_VERSION_MAX_MAJOR "${CMAKE_MATCH_2}") + set(PACKAGE_FIND_VERSION_MAX_MINOR "${CMAKE_MATCH_4}") + set(PACKAGE_FIND_VERSION_MAX_PATCH "${CMAKE_MATCH_6}") + set(PACKAGE_FIND_VERSION_MAX_TWEAK "${CMAKE_MATCH_8}") + else() + message(FATAL_ERROR "_version_requested (${_version_requested}) should be a version range") + endif() set(_expected_exact 0) + else() + set (_compatibilities ${COMPATIBILITIES}) + set(PACKAGE_FIND_VERSION ${_version_requested}) + if("${PACKAGE_FIND_VERSION}" MATCHES [[(^([0-9]+)(\.([0-9]+)(\.([0-9]+)(\.([0-9]+))?)?)?)?$]]) + set(PACKAGE_FIND_VERSION_MAJOR "${CMAKE_MATCH_2}") + set(PACKAGE_FIND_VERSION_MINOR "${CMAKE_MATCH_4}") + set(PACKAGE_FIND_VERSION_PATCH "${CMAKE_MATCH_6}") + set(PACKAGE_FIND_VERSION_TWEAK "${CMAKE_MATCH_8}") + else() + message(FATAL_ERROR "_version_requested (${_version_requested}) should be a version number") + endif() + + if ("${_version_installed}" STREQUAL "${_version_requested}") + set(_expected_exact 1) + else() + set(_expected_exact 0) + endif() endif() unset(PACKAGE_VERSION_COMPATIBLE) @@ -882,3 +920,54 @@ test_write_basic_config_version_file(4.5.6.7 9.9.9.0 0 0 0 0) # Request [ne test_write_basic_config_version_file(4.5.6.7 9.9.9.2 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[older tweak] test_write_basic_config_version_file(4.5.6.7 9.9.9.7 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[same tweak] test_write_basic_config_version_file(4.5.6.7 9.9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[newer tweak] + +test_write_basic_config_version_file(4 0...5 1 0 0 0) +test_write_basic_config_version_file(4 2...5 1 0 0 0) +test_write_basic_config_version_file(4 2...4 1 0 0 0) +test_write_basic_config_version_file(4 4...<5 1 1 0 0) +test_write_basic_config_version_file(4 9...10 0 0 0 0) + +test_write_basic_config_version_file(4 0.1...5 1 0 0 0) +test_write_basic_config_version_file(4 2.1...5 1 0 0 0) +test_write_basic_config_version_file(4 2.8...5 1 0 0 0) +test_write_basic_config_version_file(4 2.1...4 1 0 0 0) +test_write_basic_config_version_file(4 2.8...4 1 0 0 0) +test_write_basic_config_version_file(4 4.0...<5 1 1 0 0) +test_write_basic_config_version_file(4 4.8...<5 0 0 0 0) +test_write_basic_config_version_file(4 4.1...5 0 0 0 0) +test_write_basic_config_version_file(4 4.8...5 0 0 0 0) +test_write_basic_config_version_file(4 9.1...10 0 0 0 0) +test_write_basic_config_version_file(4 9.8...10 0 0 0 0) + + +test_write_basic_config_version_file(4.5 0.1...5 1 0 0 0) +test_write_basic_config_version_file(4.5 2.1...5 1 0 0 0) +test_write_basic_config_version_file(4.5 2.8...5 1 0 0 0) +test_write_basic_config_version_file(4.5 2.1...4 0 0 0 0) +test_write_basic_config_version_file(4.5 2.8...4 0 0 0 0) +test_write_basic_config_version_file(4.5 2.8...4.8 1 0 0 0) +test_write_basic_config_version_file(4.5 4.1...<5 1 1 0 0) +test_write_basic_config_version_file(4.5 4.8...<5 0 0 0 0) +test_write_basic_config_version_file(4.5 4.5...4.5.8 1 1 1 0) +test_write_basic_config_version_file(4.5 4.5...<4.6 1 1 1 0) +test_write_basic_config_version_file(4.5 4.1...5 1 0 0 0) +test_write_basic_config_version_file(4.5 4.8...5 0 0 0 0) +test_write_basic_config_version_file(4.5 9.1...10 0 0 0 0) +test_write_basic_config_version_file(4.5 9.8...10 0 0 0 0) + + +test_write_basic_config_version_file(4.5.6 0.1...5 1 0 0 0) +test_write_basic_config_version_file(4.5.6 2.1...5 1 0 0 0) +test_write_basic_config_version_file(4.5.6 2.8...5 1 0 0 0) +test_write_basic_config_version_file(4.5.6 2.1...4 0 0 0 0) +test_write_basic_config_version_file(4.5.6 2.8...4 0 0 0 0) +test_write_basic_config_version_file(4.5.6 2.8...4.8 1 0 0 0) +test_write_basic_config_version_file(4.5.6 4.1...<5 1 1 0 0) +test_write_basic_config_version_file(4.5.6 4.8...<5 0 0 0 0) +test_write_basic_config_version_file(4.5.6 4.5...4.5.4 0 0 0 0) +test_write_basic_config_version_file(4.5.6 4.5...4.5.8 1 1 1 0) +test_write_basic_config_version_file(4.5.6 4.5...<4.6 1 1 1 0) +test_write_basic_config_version_file(4.5.6 4.1...5 1 0 0 0) +test_write_basic_config_version_file(4.5.6 4.8...5 0 0 0 0) +test_write_basic_config_version_file(4.5.6 9.1...10 0 0 0 0) +test_write_basic_config_version_file(4.5.6 9.8...10 0 0 0 0) diff --git a/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash b/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash index b0973f4..a61e114 100755 --- a/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash +++ b/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash @@ -20,6 +20,7 @@ type -p makeuniversal >/dev/null curl -OL https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz shasum -a 256 qt-everywhere-opensource-src-5.9.9.tar.xz | grep -q 5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642 tar xjf qt-everywhere-opensource-src-5.9.9.tar.xz +patch -p0 < "${BASH_SOURCE%/*}/qt-5.9.9.patch" # Build the x86_64 variant. mkdir qt-5.9.9-x86_64 diff --git a/Utilities/Release/macos/qt-5.9.9.patch b/Utilities/Release/macos/qt-5.9.9.patch new file mode 100644 index 0000000..dfcbbdd --- /dev/null +++ b/Utilities/Release/macos/qt-5.9.9.patch @@ -0,0 +1,20 @@ +--- qt-everywhere-opensource-src-5.9.9/qtbase/mkspecs/features/mac/default_post.prf.orig 2019-12-03 07:50:08.000000000 -0500 ++++ qt-everywhere-opensource-src-5.9.9/qtbase/mkspecs/features/mac/default_post.prf 2020-12-14 09:45:11.000000000 -0500 +@@ -130,7 +130,7 @@ + -isysroot$$xcodeSDKInfo(Path, $$sdk) + QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ + -Xarch_$${arch} \ +- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk) ++ -isysroot$$xcodeSDKInfo(Path, $$sdk) + + QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) + QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) +@@ -151,7 +151,7 @@ + version_min_flag = -m$${version_identifier}-version-min=$$deployment_target + QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag + QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag +- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag ++ QMAKE_LFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag + } + + # Enable precompiled headers for multiple architectures |