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

Method GetGlobalProperty

Source/cmState.cxx:597–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597cmValue cmState::GetGlobalProperty(std::string const& prop)
598{
599 if (prop == "CACHE_VARIABLES") {
600 std::vector<std::string> cacheKeys = this->GetCacheEntryKeys();
601 this->SetGlobalProperty("CACHE_VARIABLES", cmList::to_string(cacheKeys));
602 } else if (prop == "COMMANDS") {
603 std::vector<std::string> commands = this->GetCommandNames();
604 this->SetGlobalProperty("COMMANDS", cmList::to_string(commands));
605 } else if (prop == "IN_TRY_COMPILE") {
606 this->SetGlobalProperty("IN_TRY_COMPILE",
607 this->IsTryCompile == TryCompile::Yes ? "1" : "0");
608 } else if (prop == "GENERATOR_IS_MULTI_CONFIG") {
609 this->SetGlobalProperty("GENERATOR_IS_MULTI_CONFIG",
610 this->IsGeneratorMultiConfig ? "1" : "0");
611 } else if (prop == "ENABLED_LANGUAGES") {
612 auto langs = cmList::to_string(this->EnabledLanguages);
613 this->SetGlobalProperty("ENABLED_LANGUAGES", langs);
614 } else if (prop == "CMAKE_ROLE") {
615 this->SetGlobalProperty("CMAKE_ROLE", this->GetRoleString());
616 }
617#define STRING_LIST_ELEMENT(F) ";" #F
618 if (prop == "CMAKE_C_KNOWN_FEATURES") {
619 static std::string const s_out(
620 &FOR_EACH_C_FEATURE(STRING_LIST_ELEMENT)[1]);
621 return cmValue(s_out);
622 }
623 if (prop == "CMAKE_C90_KNOWN_FEATURES") {
624 static std::string const s_out(
625 &FOR_EACH_C90_FEATURE(STRING_LIST_ELEMENT)[1]);
626 return cmValue(s_out);
627 }
628 if (prop == "CMAKE_C99_KNOWN_FEATURES") {
629 static std::string const s_out(
630 &FOR_EACH_C99_FEATURE(STRING_LIST_ELEMENT)[1]);
631 return cmValue(s_out);
632 }
633 if (prop == "CMAKE_C11_KNOWN_FEATURES") {
634 static std::string const s_out(
635 &FOR_EACH_C11_FEATURE(STRING_LIST_ELEMENT)[1]);
636 return cmValue(s_out);
637 }
638 if (prop == "CMAKE_CXX_KNOWN_FEATURES") {
639 static std::string const s_out(
640 &FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT)[1]);
641 return cmValue(s_out);
642 }
643 if (prop == "CMAKE_CXX98_KNOWN_FEATURES") {
644 static std::string const s_out(
645 &FOR_EACH_CXX98_FEATURE(STRING_LIST_ELEMENT)[1]);
646 return cmValue(s_out);
647 }
648 if (prop == "CMAKE_CXX11_KNOWN_FEATURES") {
649 static std::string const s_out(
650 &FOR_EACH_CXX11_FEATURE(STRING_LIST_ELEMENT)[1]);
651 return cmValue(s_out);
652 }
653 if (prop == "CMAKE_CXX14_KNOWN_FEATURES") {
654 static std::string const s_out(

Callers 15

CreateProjectFileMethod · 0.80
CreateCProjectFileMethod · 0.80
UseFolderPropertyMethod · 0.80
FindPackageMethod · 0.80
AppendToFoundPropertyMethod · 0.80
GetPropertyMethod · 0.80
AddSitePropertiesMethod · 0.80

Calls 7

GetCacheEntryKeysMethod · 0.95
SetGlobalPropertyMethod · 0.95
GetCommandNamesMethod · 0.95
GetRoleStringMethod · 0.95
to_stringFunction · 0.85
GetPropertyValueMethod · 0.80
cmValueClass · 0.70

Tested by 3

AddSitePropertiesMethod · 0.64
SubmitUsingHTTPMethod · 0.64
HandleCDashUploadFileMethod · 0.64