cmIncludeExternalMSProjectCommand.cxx 951 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "cmIncludeExternalMSProjectCommand.h"
  2. // cmIncludeExternalMSProjectCommand
  3. bool cmIncludeExternalMSProjectCommand::InitialPass(std::vector<std::string> const& args)
  4. {
  5. if(args.size() < 2)
  6. {
  7. this->SetError("INCLUDE_EXTERNAL_MSPROJECT called with incorrect number of arguments");
  8. return false;
  9. }
  10. if(m_Makefile->GetDefinition("WIN32")) {
  11. std::string location = args[1];
  12. m_Makefile->ExpandVariablesInString(location);
  13. std::vector<std::string> name_and_location;
  14. name_and_location.push_back(args[0]);
  15. name_and_location.push_back(location);
  16. std::vector<std::string> depends;
  17. if (args.size() > 2) {
  18. for (int i=2; i<args.size(); ++i) {
  19. depends.push_back(args[i]);
  20. }
  21. }
  22. m_Makefile->AddUtilityCommand("INCLUDE_EXTERNAL_MSPROJECT", "echo", "\"Include external project\"",
  23. false, name_and_location, depends);
  24. }
  25. return true;
  26. }