resolve cyclic dependency with zstd
[platform/upstream/cmake.git] / Source / cmSetPropertyCommand.h
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
5 #include "cmConfigure.h" // IWYU pragma: keep
6
7 #include <string>
8 #include <vector>
9
10 class cmMakefile;
11 class cmExecutionStatus;
12 class cmSourceFile;
13
14 bool cmSetPropertyCommand(std::vector<std::string> const& args,
15                           cmExecutionStatus& status);
16
17 namespace SetPropertyCommand {
18 bool HandleSourceFileDirectoryScopes(
19   cmExecutionStatus& status, std::vector<std::string>& source_file_directories,
20   std::vector<std::string>& source_file_target_directories,
21   std::vector<cmMakefile*>& directory_makefiles);
22
23 bool HandleSourceFileDirectoryScopeValidation(
24   cmExecutionStatus& status, bool source_file_directory_option_enabled,
25   bool source_file_target_option_enabled,
26   std::vector<std::string>& source_file_directories,
27   std::vector<std::string>& source_file_target_directories);
28
29 bool HandleAndValidateSourceFileDirectoryScopes(
30   cmExecutionStatus& status, bool source_directories_option_encountered,
31   bool source_target_directories_option_encountered,
32   std::vector<std::string>& source_directories,
33   std::vector<std::string>& source_target_directories,
34   std::vector<cmMakefile*>& source_file_directory_makefiles);
35
36 std::string MakeSourceFilePathAbsoluteIfNeeded(
37   cmExecutionStatus& status, const std::string& source_file_path, bool needed);
38 void MakeSourceFilePathsAbsoluteIfNeeded(
39   cmExecutionStatus& status,
40   std::vector<std::string>& source_files_absolute_paths,
41   std::vector<std::string>::const_iterator files_it_begin,
42   std::vector<std::string>::const_iterator files_it_end, bool needed);
43
44 enum class PropertyOp
45 {
46   Remove,
47   Set,
48   Append,
49   AppendAsString
50 };
51
52 bool HandleAndValidateSourceFilePropertyGENERATED(
53   cmSourceFile* sf, std::string const& propertyValue,
54   PropertyOp op = PropertyOp::Set);
55 }