summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeDirectoryCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmIncludeDirectoryCommand.cxx')
-rw-r--r--Source/cmIncludeDirectoryCommand.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx
index d56fe5c..be8f277 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/Source/cmIncludeDirectoryCommand.cxx
@@ -43,15 +43,24 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// cmIncludeDirectoryCommand
bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string> const& args)
{
- if(args.size() < 1 )
+ if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
return false;
}
- for(std::vector<std::string>::const_iterator i = args.begin();
- i != args.end(); ++i)
+
+ std::vector<std::string>::const_iterator i = args.begin();
+
+ bool before = false;
+ if ((*i) == "BEFORE")
+ {
+ before = true;
+ ++i;
+ }
+
+ for(; i != args.end(); ++i)
{
- m_Makefile->AddIncludeDirectory((*i).c_str());
+ m_Makefile->AddIncludeDirectory((*i).c_str(), before);
}
return true;
}