diff options
47 files changed, 232 insertions, 145 deletions
diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst index dcc0225..857de78 100644 --- a/Help/command/find_package.rst +++ b/Help/command/find_package.rst @@ -59,7 +59,7 @@ for finding the package, checking the version, and producing any needed messages. Some find-modules provide limited or no support for versioning; check the module documentation. -If the ``MODULE`` option is not specfied in the above signature, +If the ``MODULE`` option is not specified in the above signature, CMake first searches for the package using Module mode. Then, if the package is not found, it searches again using Config mode. A user may set the variable :variable:`CMAKE_FIND_PACKAGE_PREFER_CONFIG` to diff --git a/Help/variable/CMAKE_CUDA_HOST_COMPILER.rst b/Help/variable/CMAKE_CUDA_HOST_COMPILER.rst index 34512b4..07342b5 100644 --- a/Help/variable/CMAKE_CUDA_HOST_COMPILER.rst +++ b/Help/variable/CMAKE_CUDA_HOST_COMPILER.rst @@ -3,8 +3,23 @@ CMAKE_CUDA_HOST_COMPILER .. versionadded:: 3.10 -Executable to use when compiling host code when compiling ``CUDA`` language -files. Maps to the ``nvcc -ccbin`` option. Will only be used by CMake on the first -configuration to determine a valid host compiler for ``CUDA``. After a valid -host compiler has been found, this value is read-only. This variable takes -priority over the :envvar:`CUDAHOSTCXX` environment variable. +When :variable:`CMAKE_CUDA_COMPILER <CMAKE_<LANG>_COMPILER>` is set to +NVIDIA ``nvcc``, ``CMAKE_CUDA_HOST_COMPILER`` selects the compiler +executable to use when compiling host code for ``CUDA`` language files. +This maps to the ``nvcc -ccbin`` option. + +The ``CMAKE_CUDA_HOST_COMPILER`` variable may be set explicitly before CUDA is +first enabled by a :command:`project` or :command:`enable_language` command. +This can be done via ``-DCMAKE_CUDA_HOST_COMPILER=...`` on the command line +or in a :ref:`toolchain file <Cross Compiling Toolchain>`. Or, one may set +the :envvar:`CUDAHOSTCXX` environment variable to provide a default value. + +Once the CUDA language is enabled, the ``CMAKE_CUDA_HOST_COMPILER`` variable +is read-only and changes to it are undefined behavior. + +.. note:: + + Since ``CMAKE_CUDA_HOST_COMPILER`` is meaningful only when the + ``CMAKE_CUDA_COMPILER`` is ``nvcc``, it does not make sense to + set ``CMAKE_CUDA_HOST_COMPILER`` explicitly without also setting + ``CMAKE_CUDA_COMPILER`` explicitly to be sure it is ``nvcc``. diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 692ce20..fa497cd 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -188,7 +188,7 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") set(nvcc_test_flags "--keep --keep-dir tmp") if(CMAKE_CUDA_HOST_COMPILER) - string(APPEND nvcc_test_flags " -ccbin=${CMAKE_CUDA_HOST_COMPILER}") + string(APPEND nvcc_test_flags " -ccbin=\"${CMAKE_CUDA_HOST_COMPILER}\"") endif() elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") if(WIN32) @@ -456,7 +456,7 @@ elseif(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") "Parsed CUDA nvcc implicit link information from above output:\n${_nvcc_log}\n${log}\n\n") else() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Failed to parsed CUDA nvcc implicit link information:\n${_nvcc_log}\n\n") + "Failed to parse CUDA nvcc implicit link information:\n${_nvcc_log}\n\n") message(FATAL_ERROR "Failed to extract nvcc implicit link line.") endif() endif() diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake index d67d8d3..44387d4 100644 --- a/Modules/CheckLanguage.cmake +++ b/Modules/CheckLanguage.cmake @@ -20,7 +20,7 @@ test project. The result is cached in :variable:`CMAKE_<LANG>_COMPILER` as the compiler that was found, or ``NOTFOUND`` if the language cannot be enabled. For CUDA which can have an explicit host compiler, the cache :variable:`CMAKE_CUDA_HOST_COMPILER` variable will be set if it was required -for compilation. +for compilation (and cleared if it was not). Example: diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c78852e..e3931ce 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 18) -set(CMake_VERSION_PATCH 20200713) +set(CMake_VERSION_PATCH 20200715) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/cmBinUtilsMacOSMachOLinker.cxx b/Source/cmBinUtilsMacOSMachOLinker.cxx index 98250b1..0f47146 100644 --- a/Source/cmBinUtilsMacOSMachOLinker.cxx +++ b/Source/cmBinUtilsMacOSMachOLinker.cxx @@ -14,6 +14,18 @@ #include "cmStringAlgorithms.h" #include "cmSystemTools.h" +namespace { +bool IsMissingSystemDylib(std::string const& path) +{ + // Starting on macOS 11, the dynamic loader has a builtin cache of + // system-provided dylib files that do not exist on the filesystem. + // Tell our caller that these are expected to be missing. + return ((cmHasLiteralPrefix(path, "/System/Library/") || + cmHasLiteralPrefix(path, "/usr/lib/")) && + !cmSystemTools::PathExists(path)); +} +} + cmBinUtilsMacOSMachOLinker::cmBinUtilsMacOSMachOLinker( cmRuntimeDependencyArchive* archive) : cmBinUtilsLinker(archive) @@ -82,7 +94,8 @@ bool cmBinUtilsMacOSMachOLinker::GetFileDependencies( return false; } if (resolved) { - if (!this->Archive->IsPostExcluded(path)) { + if (!this->Archive->IsPostExcluded(path) && + !IsMissingSystemDylib(path)) { auto filename = cmSystemTools::GetFilenameName(path); bool unique; this->Archive->AddResolvedPath(filename, path, unique); diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 35bd681..95686ea 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -578,10 +578,7 @@ cmProp cmCacheManager::CacheEntry::GetProperty(const std::string& prop) const bool cmCacheManager::CacheEntry::GetPropertyAsBool( const std::string& prop) const { - if (cmProp value = this->GetProperty(prop)) { - return cmIsOn(*value); - } - return false; + return cmIsOn(this->GetProperty(prop)); } void cmCacheManager::CacheEntry::SetProperty(const std::string& prop, diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 051eff6..8aee27c 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -41,7 +41,7 @@ std::vector<std::string> const& cmCommonTargetGenerator::GetConfigNames() const const char* cmCommonTargetGenerator::GetFeature(const std::string& feature, const std::string& config) { - return this->GeneratorTarget->GetFeature(feature, config); + return this->GeneratorTarget->GetFeature(feature, config)->c_str(); } void cmCommonTargetGenerator::AddModuleDefinitionFlag( diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 5efa365..fbb95e1 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -515,7 +515,7 @@ bool cmComputeLinkInformation::Compute() // Restore the target link type so the correct system runtime // libraries are found. cmProp lss = this->Target->GetProperty("LINK_SEARCH_END_STATIC"); - if (lss && cmIsOn(*lss)) { + if (cmIsOn(lss)) { this->SetCurrentLinkType(LinkStatic); } else { this->SetCurrentLinkType(this->StartLinkType); @@ -841,7 +841,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo() // Lookup the starting link type from the target (linked statically?). cmProp lss = this->Target->GetProperty("LINK_SEARCH_START_STATIC"); - this->StartLinkType = (lss && cmIsOn(*lss)) ? LinkStatic : LinkShared; + this->StartLinkType = cmIsOn(lss) ? LinkStatic : LinkShared; this->CurrentLinkType = this->StartLinkType; } diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 652c041..be22ad4 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -236,9 +236,8 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( // // Also we can disable external (outside the project) files by setting ON // CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable. - const bool excludeExternal = - cmIsOn(it.second[0]->GetMakefile()->GetSafeDefinition( - "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES")); + const bool excludeExternal = it.second[0]->GetMakefile()->IsOn( + "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES"); if (!splitted.empty() && (!excludeExternal || (relative.find("..") == std::string::npos)) && relative.find("CMakeFiles") == std::string::npos) { @@ -380,9 +379,8 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( cmSystemTools::RelativePath(lg->GetSourceDirectory(), fullPath); // Do not add this file if it has ".." in relative path and // if CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable is on. - const bool excludeExternal = - cmIsOn(lg->GetMakefile()->GetSafeDefinition( - "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES")); + const bool excludeExternal = lg->GetMakefile()->IsOn( + "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES"); if (excludeExternal && (relative.find("..") != std::string::npos)) { continue; diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 8d5b177..e5fa14e 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1166,9 +1166,9 @@ void cmFindPackageCommand::AppendSuccessInformation() std::string found = cmStrCat(this->Name, "_FOUND"); std::string upperFound = cmSystemTools::UpperCase(found); - const char* upperResult = this->Makefile->GetDefinition(upperFound); - const char* result = this->Makefile->GetDefinition(found); - bool packageFound = ((cmIsOn(result)) || (cmIsOn(upperResult))); + bool upperResult = this->Makefile->IsOn(upperFound); + bool result = this->Makefile->IsOn(found); + bool packageFound = (result || upperResult); this->AppendToFoundProperty(packageFound); diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 6e293d5..840f511 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -406,9 +406,3 @@ const std::string& cmGeneratorExpressionInterpreter::Evaluate( this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker, nullptr, this->Language); } - -const std::string& cmGeneratorExpressionInterpreter::Evaluate( - const char* expression, const std::string& property) -{ - return this->Evaluate(std::string(expression ? expression : ""), property); -} diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 75bba02..09d8b88 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -199,8 +199,6 @@ public: const std::string& Evaluate(std::string expression, const std::string& property); - const std::string& Evaluate(const char* expression, - const std::string& property); protected: cmGeneratorExpression GeneratorExpression; diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index 4f379cd..e223f15 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -154,6 +154,14 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingPICExpression() const return this->Top()->Property == "INTERFACE_POSITION_INDEPENDENT_CODE"; } +bool cmGeneratorExpressionDAGChecker::EvaluatingCompileExpression() const +{ + cm::string_view property(this->Top()->Property); + + return property == "INCLUDE_DIRECTORIES"_s || + property == "COMPILE_DEFINITIONS"_s || property == "COMPILE_OPTIONS"_s; +} + bool cmGeneratorExpressionDAGChecker::EvaluatingLinkExpression() const { cm::string_view property(this->Top()->Property); diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index c2c5b6b..ac2314c 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -68,6 +68,7 @@ struct cmGeneratorExpressionDAGChecker bool EvaluatingGenexExpression() const; bool EvaluatingPICExpression() const; + bool EvaluatingCompileExpression() const; bool EvaluatingLinkExpression() const; bool EvaluatingLinkOptionsExpression() const; diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 4adc6a2..a1a0ae8 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -967,9 +967,10 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode const std::vector<std::string>& parameters, cmGeneratorExpressionContext* context, const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override + cmGeneratorExpressionDAGChecker* dagChecker) const override { - if (context->Language.empty()) { + if (context->Language.empty() && + (!dagChecker || !dagChecker->EvaluatingCompileExpression())) { reportError( context, content->GetOriginalExpression(), "$<COMPILE_LANGUAGE:...> may only be used to specify include " @@ -1014,7 +1015,9 @@ static const struct CompileLanguageAndIdNode : public cmGeneratorExpressionNode const GeneratorExpressionContent* content, cmGeneratorExpressionDAGChecker* dagChecker) const override { - if (!context->HeadTarget || context->Language.empty()) { + if (!context->HeadTarget || + (context->Language.empty() && + (!dagChecker || !dagChecker->EvaluatingCompileExpression()))) { // reportError(context, content->GetOriginalExpression(), ""); reportError( context, content->GetOriginalExpression(), diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ccd8e7e..46615d3 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -815,18 +815,18 @@ void cmGeneratorTarget::ComputeObjectMapping() } } -const char* cmGeneratorTarget::GetFeature(const std::string& feature, - const std::string& config) const +cmProp cmGeneratorTarget::GetFeature(const std::string& feature, + const std::string& config) const { if (!config.empty()) { std::string featureConfig = cmStrCat(feature, '_', cmSystemTools::UpperCase(config)); if (cmProp value = this->GetProperty(featureConfig)) { - return value->c_str(); + return value; } } if (cmProp value = this->GetProperty(feature)) { - return value->c_str(); + return value; } return this->LocalGenerator->GetFeature(feature, config); } @@ -853,10 +853,9 @@ const char* cmGeneratorTarget::GetLinkPIEProperty( bool cmGeneratorTarget::IsIPOEnabled(std::string const& lang, std::string const& config) const { - const char* feature = "INTERPROCEDURAL_OPTIMIZATION"; - const bool result = cmIsOn(this->GetFeature(feature, config)); + cmProp feature = this->GetFeature("INTERPROCEDURAL_OPTIMIZATION", config); - if (!result) { + if (!cmIsOn(feature)) { // 'INTERPROCEDURAL_OPTIMIZATION' is off, no need to check policies return false; } @@ -1001,7 +1000,7 @@ bool cmGeneratorTarget::GetLanguageStandardRequired( { cmProp p = this->GetPropertyWithPairedLanguageSupport(lang, "_STANDARD_REQUIRED"); - return p && cmIsOn(*p); + return cmIsOn(p); } void cmGeneratorTarget::GetModuleDefinitionSources( @@ -5411,8 +5410,7 @@ bool getTypedProperty<bool>(cmGeneratorTarget const* tgt, } cmProp value = tgt->GetProperty(prop); - return cmIsOn( - genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop)); + return cmIsOn(genexInterpreter->Evaluate(value ? *value : "", prop)); } template <> @@ -5426,8 +5424,7 @@ const char* getTypedProperty<const char*>( return value ? value->c_str() : nullptr; } - return genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop) - .c_str(); + return genexInterpreter->Evaluate(value ? *value : "", prop).c_str(); } template <> @@ -5441,7 +5438,7 @@ std::string getTypedProperty<std::string>( return valueAsString(value ? value->c_str() : nullptr); } - return genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop); + return genexInterpreter->Evaluate(value ? *value : "", prop); } template <typename PropertyType> diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 07f071b..08aa015 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -175,8 +175,8 @@ public: void ComputeObjectMapping(); - const char* GetFeature(const std::string& feature, - const std::string& config) const; + cmProp GetFeature(const std::string& feature, + const std::string& config) const; const char* GetLinkPIEProperty(const std::string& config) const; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 358d65a..1589c47 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -550,9 +550,9 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj) */ for (auto& sg : groupFilesList) { std::ostream* fout; - bool useProjectFile = cmIsOn(*this->GeneratorTarget->GetProperty( - "GHS_NO_SOURCE_GROUP_FILE")) || - cmIsOn(this->Makefile->GetDefinition("CMAKE_GHS_NO_SOURCE_GROUP_FILE")); + bool useProjectFile = + cmIsOn(this->GeneratorTarget->GetProperty("GHS_NO_SOURCE_GROUP_FILE")) || + this->Makefile->IsOn("CMAKE_GHS_NO_SOURCE_GROUP_FILE"); if (useProjectFile || sg.empty()) { fout = &fout_proj; } else { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index a0cee0e..49b73a8 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -304,14 +304,10 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const for (const auto& target : localGen->GetGeneratorTargets()) { if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET || target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY || - target->GetType() == cmStateEnums::TargetType::UTILITY) { + target->GetType() == cmStateEnums::TargetType::UTILITY || + cmIsOn(target->GetProperty("ghs_integrity_app"))) { continue; } - if (cmProp p = target->GetProperty("ghs_integrity_app")) { - if (cmIsOn(*p)) { - continue; - } - } std::vector<std::string> configs = target->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig); @@ -374,14 +370,10 @@ bool cmGlobalGenerator::CheckTargetsForPchCompilePdb() const for (const auto& target : generator->GetGeneratorTargets()) { if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET || target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY || - target->GetType() == cmStateEnums::TargetType::UTILITY) { + target->GetType() == cmStateEnums::TargetType::UTILITY || + cmIsOn(target->GetProperty("ghs_integrity_app"))) { continue; } - if (cmProp p = target->GetProperty("ghs_integrity_app")) { - if (cmIsOn(*p)) { - continue; - } - } std::string const& reuseFrom = target->GetSafeProperty("PRECOMPILE_HEADERS_REUSE_FROM"); diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index d36adfb..4d52d96 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -470,8 +470,7 @@ void cmGlobalGhsMultiGenerator::WriteAllTarget( if (t->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } - cmProp p = t->GetProperty("EXCLUDE_FROM_ALL"); - if (!(p && cmIsOn(*p))) { + if (!cmIsOn(t->GetProperty("EXCLUDE_FROM_ALL"))) { defaultTargets.push_back(t); } } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 9f798e6..c851eea 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -694,9 +694,7 @@ std::set<std::string> cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( } // inspect EXCLUDE_FROM_DEFAULT_BUILD[_<CONFIG>] properties for (std::string const& i : configs) { - const char* propertyValue = - target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i); - if (cmIsOff(propertyValue)) { + if (cmIsOff(target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i))) { activeConfigs.insert(i); } } diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx index c50a786..5739fec 100644 --- a/Source/cmLinkLineDeviceComputer.cxx +++ b/Source/cmLinkLineDeviceComputer.cxx @@ -191,21 +191,18 @@ bool requireDeviceLinking(cmGeneratorTarget& target, cmLocalGenerator& lg, target.GetLinkClosure(config); if (cm::contains(closure->Languages, "CUDA")) { - if (cmProp separableCompilation = - target.GetProperty("CUDA_SEPARABLE_COMPILATION")) { - if (cmIsOn(*separableCompilation)) { - bool doDeviceLinking = false; - switch (target.GetType()) { - case cmStateEnums::SHARED_LIBRARY: - case cmStateEnums::MODULE_LIBRARY: - case cmStateEnums::EXECUTABLE: - doDeviceLinking = true; - break; - default: - break; - } - return doDeviceLinking; + if (cmIsOn(target.GetProperty("CUDA_SEPARABLE_COMPILATION"))) { + bool doDeviceLinking = false; + switch (target.GetType()) { + case cmStateEnums::SHARED_LIBRARY: + case cmStateEnums::MODULE_LIBRARY: + case cmStateEnums::EXECUTABLE: + doDeviceLinking = true; + break; + default: + break; } + return doDeviceLinking; } cmComputeLinkInformation* pcli = target.GetLinkInformation(config); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 489065b..59880c2 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -130,7 +130,7 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) this->LinkerSysroot = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT"); } - if (std::string const* appleArchSysroots = + if (cmProp appleArchSysroots = this->Makefile->GetDef("CMAKE_APPLE_ARCH_SYSROOTS")) { std::string const& appleArchs = this->Makefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES"); @@ -1543,9 +1543,8 @@ void cmLocalGenerator::GetTargetFlags( frameworkPath, linkPath); } - if (cmIsOn(this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) { - std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + - linkLanguage + std::string("_FLAGS"); + if (this->Makefile->IsOn("BUILD_SHARED_LIBS")) { + std::string sFlagVar = "CMAKE_SHARED_BUILD_" + linkLanguage + "_FLAGS"; exeFlags += this->Makefile->GetSafeDefinition(sFlagVar); exeFlags += " "; } @@ -3253,8 +3252,8 @@ void cmLocalGenerator::AppendFeatureOptions(std::string& flags, } } -const char* cmLocalGenerator::GetFeature(const std::string& feature, - const std::string& config) +cmProp cmLocalGenerator::GetFeature(const std::string& feature, + const std::string& config) { std::string featureName = feature; // TODO: Define accumulation policy for features (prepend, append, @@ -3266,7 +3265,7 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature, cmStateSnapshot snp = this->StateSnapshot; while (snp.IsValid()) { if (cmProp value = snp.GetDirectory().GetProperty(featureName)) { - return value->c_str(); + return value; } snp = snp.GetBuildsystemDirectoryParent(); } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index f4781d6..0c51a65 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -20,6 +20,7 @@ #include "cmMessageType.h" #include "cmOutputConverter.h" #include "cmPolicies.h" +#include "cmProperty.h" #include "cmStateSnapshot.h" class cmComputeLinkInformation; @@ -209,8 +210,7 @@ public: void AppendFeatureOptions(std::string& flags, const std::string& lang, const char* feature); - const char* GetFeature(const std::string& feature, - const std::string& config); + cmProp GetFeature(const std::string& feature, const std::string& config); /** \brief Get absolute path to dependency \a name * diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 75c8934..aca40fa 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2521,8 +2521,7 @@ void cmMakefile::ExpandVariablesCMP0019() bool cmMakefile::IsOn(const std::string& name) const { - const char* value = this->GetDefinition(name); - return cmIsOn(value); + return cmIsOn(this->GetDef(name)); } bool cmMakefile::IsSet(const std::string& name) const @@ -4116,8 +4115,7 @@ cmProp cmMakefile::GetProperty(const std::string& prop, bool chain) const bool cmMakefile::GetPropertyAsBool(const std::string& prop) const { - cmProp p = this->GetProperty(prop); - return p && cmIsOn(*p); + return cmIsOn(this->GetProperty(prop)); } std::vector<std::string> cmMakefile::GetPropertyKeys() const diff --git a/Source/cmMakefileProfilingData.cxx b/Source/cmMakefileProfilingData.cxx index e0150dc..29fd440 100644 --- a/Source/cmMakefileProfilingData.cxx +++ b/Source/cmMakefileProfilingData.cxx @@ -58,7 +58,7 @@ void cmMakefileProfilingData::StartEntry(const cmListFileFunction& lff, cmsys::SystemInformation info; Json::Value v; v["ph"] = "B"; - v["name"] = lff.Name.Original; + v["name"] = lff.Name.Lower; v["cat"] = "cmake"; v["ts"] = Json::Value::UInt64( std::chrono::duration_cast<std::chrono::microseconds>( diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 6887569..9f4c18d 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -197,8 +197,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() } // add custom commands to the clean rules? - cmProp clean_no_custom = this->Makefile->GetProperty("CLEAN_NO_CUSTOM"); - bool clean = clean_no_custom ? cmIsOff(*clean_no_custom) : true; + bool clean = cmIsOff(this->Makefile->GetProperty("CLEAN_NO_CUSTOM")); // First generate the object rule files. Save a list of all object // files for this target. diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx index 3d4f5d7..fac2bbf 100644 --- a/Source/cmQtAutoGenGlobalInitializer.cxx +++ b/Source/cmQtAutoGenGlobalInitializer.cxx @@ -50,7 +50,7 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer( { cmMakefile* makefile = localGen->GetMakefile(); // Detect global autogen target name - if (cmIsOn(makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTOGEN_TARGET"))) { + if (makefile->IsOn("CMAKE_GLOBAL_AUTOGEN_TARGET")) { std::string targetName = makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTOGEN_TARGET_NAME"); if (targetName.empty()) { @@ -61,7 +61,7 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer( } // Detect global autorcc target name - if (cmIsOn(makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTORCC_TARGET"))) { + if (makefile->IsOn("CMAKE_GLOBAL_AUTORCC_TARGET")) { std::string targetName = makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTORCC_TARGET_NAME"); if (targetName.empty()) { diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 7e0bf96..d80092a 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -489,7 +489,7 @@ bool cmQtAutoGenInitializer::InitCustomTargets() if (this->Moc.Enabled) { // Path prefix - if (cmIsOn(this->GenTarget->GetSafeProperty("AUTOMOC_PATH_PREFIX"))) { + if (cmIsOn(this->GenTarget->GetProperty("AUTOMOC_PATH_PREFIX"))) { this->Moc.PathPrefix = true; } diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 51509fd..6ca763b 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -4,6 +4,7 @@ #include <set> #include <sstream> +#include <unordered_set> #include "cmExecutionStatus.h" #include "cmGlobalGenerator.h" @@ -82,6 +83,8 @@ bool HandleSourceFileDirectoryScopes( std::vector<std::string>& source_file_target_directories, std::vector<cmMakefile*>& directory_makefiles) { + std::unordered_set<cmMakefile*> directory_makefiles_set; + cmMakefile* current_dir_mf = &status.GetMakefile(); if (!source_file_directories.empty()) { for (const std::string& dir_path : source_file_directories) { @@ -94,7 +97,11 @@ bool HandleSourceFileDirectoryScopes( status.SetError(cmStrCat("given non-existent DIRECTORY ", dir_path)); return false; } - directory_makefiles.push_back(dir_mf); + if (directory_makefiles_set.find(dir_mf) == + directory_makefiles_set.end()) { + directory_makefiles.push_back(dir_mf); + directory_makefiles_set.insert(dir_mf); + } } } @@ -110,7 +117,12 @@ bool HandleSourceFileDirectoryScopes( cmMakefile* target_dir_mf = status.GetMakefile().GetGlobalGenerator()->FindMakefile( *target_source_dir); - directory_makefiles.push_back(target_dir_mf); + + if (directory_makefiles_set.find(target_dir_mf) == + directory_makefiles_set.end()) { + directory_makefiles.push_back(target_dir_mf); + directory_makefiles_set.insert(target_dir_mf); + } } } diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 781ddbc..ef44a57 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -380,8 +380,7 @@ const char* cmSourceFile::GetSafeProperty(const std::string& prop) const bool cmSourceFile::GetPropertyAsBool(const std::string& prop) const { - cmProp p = this->GetProperty(prop); - return p && cmIsOn(*p); + return cmIsOn(this->GetProperty(prop)); } void cmSourceFile::SetProperties(cmPropertyMap properties) diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 0b6b40f..73f166c 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -623,8 +623,7 @@ cmProp cmState::GetGlobalProperty(const std::string& prop) bool cmState::GetGlobalPropertyAsBool(const std::string& prop) { - cmProp p = this->GetGlobalProperty(prop); - return p && cmIsOn(*p); + return cmIsOn(this->GetGlobalProperty(prop)); } void cmState::SetSourceDirectory(std::string const& sourceDirectory) diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx index a4fe663..796bb1f 100644 --- a/Source/cmStateDirectory.cxx +++ b/Source/cmStateDirectory.cxx @@ -648,8 +648,7 @@ cmProp cmStateDirectory::GetProperty(const std::string& prop, bool chain) const bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const { - cmProp p = this->GetProperty(prop); - return p && cmIsOn(*p); + return cmIsOn(this->GetProperty(prop)); } std::vector<std::string> cmStateDirectory::GetPropertyKeys() const diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx index cfabc3f..bf8e331 100644 --- a/Source/cmStateSnapshot.cxx +++ b/Source/cmStateSnapshot.cxx @@ -323,7 +323,7 @@ void cmStateSnapshot::SetDefaultDefinitions() #if defined(__CYGWIN__) std::string legacy; if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) && - cmIsOn(legacy.c_str())) { + cmIsOn(legacy)) { this->SetDefinition("WIN32", "1"); this->SetDefinition("CMAKE_HOST_WIN32", "1"); } diff --git a/Source/cmStringAlgorithms.h b/Source/cmStringAlgorithms.h index a5ecca7..3d5bf7e 100644 --- a/Source/cmStringAlgorithms.h +++ b/Source/cmStringAlgorithms.h @@ -205,10 +205,11 @@ bool cmIsNOTFOUND(cm::string_view val); bool cmIsOn(cm::string_view val); inline bool cmIsOn(const char* val) { - if (!val) { - return false; - } - return cmIsOn(cm::string_view(val)); + return val && cmIsOn(cm::string_view(val)); +} +inline bool cmIsOn(std::string const* val) +{ + return val && cmIsOn(*val); } /** @@ -221,10 +222,11 @@ inline bool cmIsOn(const char* val) bool cmIsOff(cm::string_view val); inline bool cmIsOff(const char* val) { - if (!val) { - return true; - } - return cmIsOff(cm::string_view(val)); + return !val || cmIsOff(cm::string_view(val)); +} +inline bool cmIsOff(std::string const* val) +{ + return !val || cmIsOff(*val); } /** Returns true if string @a str starts with the character @a prefix. */ diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index a4f9083..aec9afa 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1884,8 +1884,7 @@ std::string const& cmTarget::GetSafeProperty(std::string const& prop) const bool cmTarget::GetPropertyAsBool(const std::string& prop) const { - cmProp p = this->GetProperty(prop); - return p && cmIsOn(*p); + return cmIsOn(this->GetProperty(prop)); } cmPropertyMap const& cmTarget::GetProperties() const diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index 0e3cf08..55e941d 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -324,8 +324,7 @@ bool cmXCodeScheme::WriteLaunchActionBooleanAttribute( bool defaultValue) { cmProp property = Target->GetTarget()->GetProperty(varName); - bool isOn = - (property == nullptr && defaultValue) || (property && cmIsOn(*property)); + bool isOn = (property == nullptr && defaultValue) || cmIsOn(property); if (isOn) { xout.Attribute(attrName.c_str(), "YES"); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 2656849..45fa44b 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1487,10 +1487,10 @@ int cmake::Configure() this->Messenger->SetSuppressDeprecatedWarnings(value && cmIsOff(*value)); value = this->State->GetCacheEntryValue("CMAKE_ERROR_DEPRECATED"); - this->Messenger->SetDeprecatedWarningsAsErrors(value && cmIsOn(*value)); + this->Messenger->SetDeprecatedWarningsAsErrors(cmIsOn(value)); value = this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); - this->Messenger->SetSuppressDevWarnings(value && cmIsOn(*value)); + this->Messenger->SetSuppressDevWarnings(cmIsOn(value)); value = this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_ERRORS"); this->Messenger->SetDevWarningsAsErrors(value && cmIsOff(*value)); @@ -2742,9 +2742,7 @@ int cmake::Build(int jobs, const std::string& dir, } projName = *cachedProjectName; - cmProp cachedVerbose = - this->State->GetCacheEntryValue("CMAKE_VERBOSE_MAKEFILE"); - if (cachedVerbose && cmIsOn(*cachedVerbose)) { + if (cmIsOn(this->State->GetCacheEntryValue("CMAKE_VERBOSE_MAKEFILE"))) { verbose = true; } diff --git a/Tests/Properties/CMakeLists.txt b/Tests/Properties/CMakeLists.txt index 74d99fa..162a178 100644 --- a/Tests/Properties/CMakeLists.txt +++ b/Tests/Properties/CMakeLists.txt @@ -261,6 +261,25 @@ function(check_get_property_value expected) endif() endfunction() +# Check that source file directory scopes are deduplicated. +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/src32.cpp" + DIRECTORY SubDir2 SubDir2 SubDir2 + TARGET_DIRECTORY set_prop_lib_3 set_prop_lib_3 set_prop_lib_3 + APPEND + PROPERTY NON_DUPLICATED_CUSTOM_PROP 1 +) + +get_property(actual + SOURCE "${CMAKE_CURRENT_BINARY_DIR}/src32.cpp" + DIRECTORY SubDir2 + PROPERTY NON_DUPLICATED_CUSTOM_PROP) +check_get_property_value("1") + +get_source_file_property(actual "${CMAKE_CURRENT_BINARY_DIR}/src32.cpp" + TARGET_DIRECTORY set_prop_lib_3 + NON_DUPLICATED_CUSTOM_PROP) +check_get_property_value("1") + # Get property + target directory get_property(actual SOURCE "${src_prefix}/src1.cpp" diff --git a/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake b/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake index 19ece86..2e8eac1 100644 --- a/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake +++ b/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake @@ -16,3 +16,16 @@ if (NOT JSON_TRAILER MATCHES "^}]$") set(RunCMake_TEST_FAILED "Expected valid JSON end") return() endif() + +file(STRINGS ${ProfilingTestOutput} upperCaseCommand + REGEX [["name"[ ]*:[ ]*"__TESTING_COMMAND_CASE"]]) +if (NOT "${upperCaseCommand}" STREQUAL "") + set(RunCMake_TEST_FAILED "Command name not stored in lowercase") +endif() +file(STRINGS ${ProfilingTestOutput} lowerCaseCommand + REGEX [["name"[ ]*:[ ]*"__testing_command_case"]]) +list(LENGTH lowerCaseCommand numInvocations) +if (NOT numInvocations EQUAL 1) + set(RunCMake_TEST_FAILED + "Unexpected number of lowercase command names: ${numInvocations}") +endif() diff --git a/Tests/RunCMake/CommandLine/ProfilingTest.cmake b/Tests/RunCMake/CommandLine/ProfilingTest.cmake index 837f4bf..4cf0c30 100644 --- a/Tests/RunCMake/CommandLine/ProfilingTest.cmake +++ b/Tests/RunCMake/CommandLine/ProfilingTest.cmake @@ -1 +1,5 @@ -# This file is intentionally left blank +function(__testing_command_case) +endfunction() + +# This must not appear in the profiling output as uppercase +__TESTING_COMMAND_CASE() diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake new file mode 100644 index 0000000..293ddda --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake @@ -0,0 +1,17 @@ +enable_language(C) + +add_library (lib SHARED empty.c) +set_target_properties(lib PROPERTIES + INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:C>:/usr/include>" + COMPILE_DEFINITIONS "$<$<COMPILE_LANGUAGE:C>:DEF>" + COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:C>:-O>") + +add_custom_target(drive + COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES> + $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS> + $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>) + +add_custom_command(TARGET drive PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES> + $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS> + $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake index 6691fdf..15a5e79 100644 --- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake @@ -8,3 +8,4 @@ run_cmake(COMPILE_LANGUAGE-add_executable) run_cmake(COMPILE_LANGUAGE-add_library) run_cmake(COMPILE_LANGUAGE-add_test) run_cmake(COMPILE_LANGUAGE-unknown-lang) +run_cmake(COMPILE_LANGUAGE-TARGET_PROPERTY) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake new file mode 100644 index 0000000..6a718d6 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake @@ -0,0 +1,17 @@ +enable_language(C) + +add_library (lib SHARED empty.c) +set_target_properties(lib PROPERTIES + INCLUDE_DIRECTORIES "$<$<COMPILE_LANG_AND_ID:C,GNU>:/usr/include>" + COMPILE_DEFINITIONS "$<$<COMPILE_LANG_AND_ID:C,GNU>:DEF>" + COMPILE_OPTIONS "$<$<COMPILE_LANG_AND_ID:C,GNU>:-O>") + +add_custom_target(drive + COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES> + $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS> + $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>) + +add_custom_command(TARGET drive PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES> + $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS> + $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake index a0a7bb9..68bd05d 100644 --- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake @@ -8,3 +8,4 @@ run_cmake(COMPILE_LANG_AND_ID-add_executable) run_cmake(COMPILE_LANG_AND_ID-add_library) run_cmake(COMPILE_LANG_AND_ID-add_test) run_cmake(COMPILE_LANG_AND_ID-unknown-lang) +run_cmake(COMPILE_LANG_AND_ID-TARGET_PROPERTY) diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake index 7f68398..e6f2623 100644 --- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake +++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake @@ -16,7 +16,15 @@ in file: endif() endfunction() -set(_check +function(set_with_libsystem var) + set(_tmp "${ARGN}") + if(EXISTS "/usr/lib/libSystem.B.dylib") + list(APPEND _tmp [[/usr/lib/libSystem\.B\.dylib]]) + endif() + set("${var}" "${_tmp}" PARENT_SCOPE) +endfunction() + +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] @@ -24,7 +32,6 @@ set(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps1.txt "^${_check}$") @@ -37,13 +44,12 @@ set(_check ) check_contents(deps/udeps1.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps2.txt "^${_check}$") @@ -60,13 +66,12 @@ set(_check ) check_contents(deps/udeps2.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps3.txt "^${_check}$") @@ -83,7 +88,7 @@ set(_check ) check_contents(deps/udeps3.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] @@ -91,7 +96,6 @@ set(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps4.txt "^${_check}$") @@ -104,14 +108,13 @@ set(_check ) check_contents(deps/udeps4.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/bundle_executable/bin/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps5.txt "^${_check}$") @@ -125,14 +128,13 @@ set(_check ) check_contents(deps/udeps5.txt "^${_check}$") -set(_check +set_with_libsystem(_check [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/bundle_executable/bin/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]] [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]] - [[/usr/lib/libSystem\.B\.dylib]] ) check_contents(deps/deps6.txt "^${_check}$") |