cmIncludeRegularExpressionCommand.cxx 702 B

123456789101112131415161718192021222324
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmIncludeRegularExpressionCommand.h"
  4. #include "cmMakefile.h"
  5. class cmExecutionStatus;
  6. // cmIncludeRegularExpressionCommand
  7. bool cmIncludeRegularExpressionCommand::InitialPass(
  8. std::vector<std::string> const& args, cmExecutionStatus&)
  9. {
  10. if ((args.empty()) || (args.size() > 2)) {
  11. this->SetError("called with incorrect number of arguments");
  12. return false;
  13. }
  14. this->Makefile->SetIncludeRegularExpression(args[0].c_str());
  15. if (args.size() > 1) {
  16. this->Makefile->SetComplainRegularExpression(args[1]);
  17. }
  18. return true;
  19. }