summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeDirectoryCommand.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2001-11-03 03:32:39 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2001-11-03 03:32:39 (GMT)
commitef74458b34dcf2d25b3948c535d59273c2307546 (patch)
tree3bc5ea621a5d171395e19666ae8515109bd95e79 /Source/cmIncludeDirectoryCommand.cxx
parent2fcf59b96b6ac41a1963c8b0f2b06d61c8f255a2 (diff)
downloadCMake-ef74458b34dcf2d25b3948c535d59273c2307546.zip
CMake-ef74458b34dcf2d25b3948c535d59273c2307546.tar.gz
CMake-ef74458b34dcf2d25b3948c535d59273c2307546.tar.bz2
Add optional BEFORE param to INCLUDE_DIRECTORIES so that include dirs can be specified before the actual include dirs
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;
}