~ubuntu-branches/ubuntu/intrepid/cmake/intrepid-backports

« back to all changes in this revision

Viewing changes to Source/cmIncludeExternalMSProjectCommand.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Maitland Bottoms
  • Date: 2002-02-14 18:36:25 UTC
  • Revision ID: james.westby@ubuntu.com-20020214183625-8m44isdas2k4l0f7
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

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