MCPcopy Create free account
hub / github.com/Kitware/CMake / IsPartOfDefaultBuild

Method IsPartOfDefaultBuild

Source/cmGlobalVisualStudioGenerator.cxx:827–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

825}
826
827std::set<std::string> cmGlobalVisualStudioGenerator::IsPartOfDefaultBuild(
828 std::vector<std::string> const& configs,
829 TargetDependSet const& projectTargets, cmGeneratorTarget const* target) const
830{
831 std::set<std::string> activeConfigs;
832 // if it is a utility target then only make it part of the
833 // default build if another target depends on it
834 int type = target->GetType();
835 if (type == cmStateEnums::GLOBAL_TARGET) {
836 std::vector<std::string> targetNames;
837 targetNames.push_back("INSTALL");
838 targetNames.push_back("PACKAGE");
839 for (std::string const& t : targetNames) {
840 // check if target <t> is part of default build
841 if (target->GetName() == t) {
842 std::string const propertyName =
843 cmStrCat("CMAKE_VS_INCLUDE_", t, "_TO_DEFAULT_BUILD");
844 // inspect CMAKE_VS_INCLUDE_<t>_TO_DEFAULT_BUILD properties
845 for (std::string const& i : configs) {
846 cmValue propertyValue =
847 target->Target->GetMakefile()->GetDefinition(propertyName);
848 if (propertyValue &&
849 cmIsOn(cmGeneratorExpression::Evaluate(
850 *propertyValue, target->GetLocalGenerator(), i))) {
851 activeConfigs.insert(i);
852 }
853 }
854 }
855 }
856 return activeConfigs;
857 }
858 if (type == cmStateEnums::UTILITY &&
859 !this->IsDependedOn(projectTargets, target)) {
860 return activeConfigs;
861 }
862 // inspect EXCLUDE_FROM_DEFAULT_BUILD[_<CONFIG>] properties
863 for (std::string const& i : configs) {
864 if (target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i).IsOff()) {
865 activeConfigs.insert(i);
866 }
867 }
868 return activeConfigs;
869}
870
871std::string cmGlobalVisualStudioGenerator::GetGUID(
872 std::string const& name) const

Callers 1

CreateSolutionMethod · 0.95

Calls 12

IsDependedOnMethod · 0.95
cmIsOnFunction · 0.85
push_backMethod · 0.80
cmStrCatFunction · 0.70
GetTypeMethod · 0.45
GetNameMethod · 0.45
GetDefinitionMethod · 0.45
GetMakefileMethod · 0.45
GetLocalGeneratorMethod · 0.45
insertMethod · 0.45
IsOffMethod · 0.45
GetFeatureMethod · 0.45

Tested by

no test coverage detected