cmIncludeRegularExpressionCommand.cxx 705 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 "cmExecutionStatus.h"
  5. #include "cmMakefile.h"
  6. bool cmIncludeRegularExpressionCommand(std::vector<std::string> const& args,
  7. cmExecutionStatus& status)
  8. {
  9. if (args.empty() || args.size() > 2) {
  10. status.SetError("called with incorrect number of arguments");
  11. return false;
  12. }
  13. cmMakefile& mf = status.GetMakefile();
  14. mf.SetIncludeRegularExpression(args[0]);
  15. if (args.size() > 1) {
  16. mf.SetComplainRegularExpression(args[1]);
  17. }
  18. return true;
  19. }