cmSetPropertyCommand.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include <vector>
  7. class cmMakefile;
  8. class cmExecutionStatus;
  9. class cmSourceFile;
  10. bool cmSetPropertyCommand(std::vector<std::string> const& args,
  11. cmExecutionStatus& status);
  12. namespace SetPropertyCommand {
  13. bool HandleSourceFileDirectoryScopes(
  14. cmExecutionStatus& status, std::vector<std::string>& source_file_directories,
  15. std::vector<std::string>& source_file_target_directories,
  16. std::vector<cmMakefile*>& directory_makefiles);
  17. bool HandleSourceFileDirectoryScopeValidation(
  18. cmExecutionStatus& status, bool source_file_directory_option_enabled,
  19. bool source_file_target_option_enabled,
  20. std::vector<std::string>& source_file_directories,
  21. std::vector<std::string>& source_file_target_directories);
  22. bool HandleAndValidateSourceFileDirectoryScopes(
  23. cmExecutionStatus& status, bool source_directories_option_encountered,
  24. bool source_target_directories_option_encountered,
  25. std::vector<std::string>& source_directories,
  26. std::vector<std::string>& source_target_directories,
  27. std::vector<cmMakefile*>& source_file_directory_makefiles);
  28. bool HandleTestDirectoryScopes(cmExecutionStatus& status,
  29. std::string& test_directory,
  30. cmMakefile*& directory_makefile);
  31. bool HandleTestDirectoryScopeValidation(cmExecutionStatus& status,
  32. bool test_directory_option_enabled,
  33. std::string& test_directory);
  34. bool HandleAndValidateTestDirectoryScopes(
  35. cmExecutionStatus& status, bool test_directory_option_encountered,
  36. std::string& test_directory, cmMakefile*& test_directory_makefile);
  37. std::string MakeSourceFilePathAbsoluteIfNeeded(
  38. cmExecutionStatus& status, const std::string& source_file_path, bool needed);
  39. void MakeSourceFilePathsAbsoluteIfNeeded(
  40. cmExecutionStatus& status,
  41. std::vector<std::string>& source_files_absolute_paths,
  42. std::vector<std::string>::const_iterator files_it_begin,
  43. std::vector<std::string>::const_iterator files_it_end, bool needed);
  44. enum class PropertyOp
  45. {
  46. Remove,
  47. Set,
  48. Append,
  49. AppendAsString
  50. };
  51. bool HandleAndValidateSourceFilePropertyGENERATED(
  52. cmSourceFile* sf, std::string const& propertyValue,
  53. PropertyOp op = PropertyOp::Set);
  54. }