diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-04-24 15:42:14 (GMT) |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-05-14 14:31:22 (GMT) |
commit | 3d4b70ea6474c8f29d6b5c057126582dcaad7ea7 (patch) | |
tree | d683c5a91d360982f740645dc45765b3b9d52089 /Source/cmSetPropertyCommand.h | |
parent | 4dc95526868d903c7f9e9505001cb5dbeec259c0 (diff) | |
download | CMake-3d4b70ea6474c8f29d6b5c057126582dcaad7ea7.zip CMake-3d4b70ea6474c8f29d6b5c057126582dcaad7ea7.tar.gz CMake-3d4b70ea6474c8f29d6b5c057126582dcaad7ea7.tar.bz2 |
set_source_files_properties: Allow specification of directory scope
Both set_source_files_properties() and set_property(SOURCE) now accept
two new optional arguments: DIRECTORY and TARGET_DIRECTORY.
The DIRECTORY option takes a list of relative or absolute paths
pointing to processed source directories (add_subdirectory was
already called on them).
These paths specify directory scopes where the source file properties
will be set. Previously the scope was always the currently processed
source directory.
Similarly TARGET_DIRECTORY takes a list of targets, whose source
directories will be used as the list of scopes where to set the
source file properties.
get_property() and get_source_file_property() also get the same
new arguments, except only one value can be specified instead
of a list.
Fixes: #20128
Diffstat (limited to 'Source/cmSetPropertyCommand.h')
-rw-r--r-- | Source/cmSetPropertyCommand.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h index ec36f84..af566a3 100644 --- a/Source/cmSetPropertyCommand.h +++ b/Source/cmSetPropertyCommand.h @@ -8,9 +8,38 @@ #include <string> #include <vector> +class cmMakefile; class cmExecutionStatus; bool cmSetPropertyCommand(std::vector<std::string> const& args, cmExecutionStatus& status); +namespace SetPropertyCommand { +bool HandleSourceFileDirectoryScopes( + cmExecutionStatus& status, std::vector<std::string>& source_file_directories, + std::vector<std::string>& source_file_target_directories, + std::vector<cmMakefile*>& directory_makefiles); + +bool HandleSourceFileDirectoryScopeValidation( + cmExecutionStatus& status, bool source_file_directory_option_enabled, + bool source_file_target_option_enabled, + std::vector<std::string>& source_file_directories, + std::vector<std::string>& source_file_target_directories); + +bool HandleAndValidateSourceFileDirectortoryScopes( + cmExecutionStatus& status, bool source_directories_option_encountered, + bool source_target_directories_option_encountered, + std::vector<std::string>& source_directories, + std::vector<std::string>& source_target_directories, + std::vector<cmMakefile*>& source_file_directory_makefiles); + +std::string MakeSourceFilePathAbsoluteIfNeeded( + cmExecutionStatus& status, const std::string& source_file_path, bool needed); +void MakeSourceFilePathsAbsoluteIfNeeded( + cmExecutionStatus& status, + std::vector<std::string>& source_files_absolute_paths, + std::vector<std::string>::const_iterator files_it_begin, + std::vector<std::string>::const_iterator files_it_end, bool needed); +} + #endif |