cmIncludeRegularExpressionCommand.cxx 1.0 KB

1234567891011121314151617181920212223242526272829
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmIncludeRegularExpressionCommand.h"
  11. // cmIncludeRegularExpressionCommand
  12. bool cmIncludeRegularExpressionCommand::InitialPass(
  13. std::vector<std::string> const& args, cmExecutionStatus&)
  14. {
  15. if ((args.empty()) || (args.size() > 2)) {
  16. this->SetError("called with incorrect number of arguments");
  17. return false;
  18. }
  19. this->Makefile->SetIncludeRegularExpression(args[0].c_str());
  20. if (args.size() > 1) {
  21. this->Makefile->SetComplainRegularExpression(args[1]);
  22. }
  23. return true;
  24. }