blob: 09e04803868f0fea5775763bfe20a6c43fc0d248 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
#include "cmLoadCacheCommand.h"
// cmLoadcacheCommand
bool cmLoadCacheCommand::InitialPass(std::vector<std::string>& args)
{
if (args.size()< 1)
{
this->SetError("called with wrong number of arguments.");
}
bool excludeFiles=false;
unsigned int excludeIndex=0;
unsigned int i;
std::set<std::string> excludes;
for(i=0; i<args.size(); i++)
{
if (excludeFiles)
{
m_Makefile->ExpandVariablesInString(args[i]);
excludes.insert(args[i]);
}
if (args[i] == "EXCLUDE")
{
excludeFiles=true;
}
}
for(i=0; i<args.size(); i++)
{
if (args[i] == "EXCLUDE")
{
break;
}
m_Makefile->ExpandVariablesInString(args[i]);
cmCacheManager::GetInstance()->LoadCache(args[i].c_str(),false,excludes);
cmCacheManager::GetInstance()->DefineCache(m_Makefile);
}
return true;
}
|