diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-03 03:32:39 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-03 03:32:39 (GMT) |
commit | ef74458b34dcf2d25b3948c535d59273c2307546 (patch) | |
tree | 3bc5ea621a5d171395e19666ae8515109bd95e79 /Source/cmIncludeDirectoryCommand.cxx | |
parent | 2fcf59b96b6ac41a1963c8b0f2b06d61c8f255a2 (diff) | |
download | CMake-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.cxx | 17 |
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; } |