diff options
Diffstat (limited to 'Source/cmSetSourceFilesPropertiesCommand.cxx')
| -rw-r--r-- | Source/cmSetSourceFilesPropertiesCommand.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx index c1b0c28..237b67f 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.cxx +++ b/Source/cmSetSourceFilesPropertiesCommand.cxx @@ -7,6 +7,7 @@ #include <cm/string_view> #include <cmext/algorithm> +#include <cmext/string_view> #include "cmExecutionStatus.h" #include "cmMakefile.h" @@ -82,7 +83,7 @@ bool cmSetSourceFilesPropertiesCommand(std::vector<std::string> const& args, const auto props_begin = options_it; bool file_scopes_handled = - SetPropertyCommand::HandleAndValidateSourceFileDirectortoryScopes( + SetPropertyCommand::HandleAndValidateSourceFileDirectoryScopes( status, source_file_directory_option_enabled, source_file_target_option_enabled, source_file_directories, source_file_target_directories, source_file_directory_makefiles); @@ -100,7 +101,7 @@ bool cmSetSourceFilesPropertiesCommand(std::vector<std::string> const& args, // Now call the worker function for each directory scope represented by a // cmMakefile instance. std::string errors; - for (const auto mf : source_file_directory_makefiles) { + for (auto* const mf : source_file_directory_makefiles) { bool ret = RunCommandForScope(mf, files.begin(), files.end(), props_begin, args.end(), errors); if (!ret) { @@ -167,7 +168,13 @@ static bool RunCommandForScope( if (cmSourceFile* sf = mf->GetOrCreateSource(sfname)) { // loop through the props and set them for (auto k = propertyPairs.begin(); k != propertyPairs.end(); k += 2) { - sf->SetProperty(*k, (k + 1)->c_str()); + // Special handling for GENERATED property? + if (*k == "GENERATED"_s) { + SetPropertyCommand::HandleAndValidateSourceFilePropertyGENERATED( + sf, *(k + 1)); + } else { + sf->SetProperty(*k, (k + 1)->c_str()); + } } } } |
