1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmIncludeCommand.cxx,v $
6 Date: $Date: 2002-05-01 14:12:48 $
7 Version: $Revision: 1.10 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #include "cmIncludeCommand.h"
21 bool cmIncludeCommand::InitialPass(std::vector
<std::string
> const& args
)
23 if (args
.size()< 1 || args
.size() > 2)
25 this->SetError("called with wrong number of arguments. "
26 "Include only takes one file.");
28 bool optional
= false;
31 optional
= args
[1] == "OPTIONAL";
34 bool readit
= m_Makefile
->ReadListFile( m_Makefile
->GetCurrentListFile(),
36 if(!optional
&& !readit
)
38 std::string m
= "Could not find include file: ";
40 this->SetError(m
.c_str());