cmIncludeExternalMSProjectCommand.cxx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. std::string utility_name("INCLUDE_EXTERNAL_MSPROJECT");
  23. utility_name += "_";
  24. utility_name += args[0];
  25. m_Makefile->AddUtilityCommand(utility_name.c_str(), "echo", "\"Include external project\"",
  26. false, name_and_location, depends);
  27. }
  28. return true;
  29. }