| 595 | } |
| 596 | |
| 597 | cmValue 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( |