diff options
Diffstat (limited to 'Source/cmTargetSourcesCommand.cxx')
-rw-r--r-- | Source/cmTargetSourcesCommand.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx index 818e271..b425acb 100644 --- a/Source/cmTargetSourcesCommand.cxx +++ b/Source/cmTargetSourcesCommand.cxx @@ -16,6 +16,7 @@ #include "cmMakefile.h" #include "cmMessageType.h" #include "cmPolicies.h" +#include "cmStateTypes.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include "cmTarget.h" @@ -202,6 +203,11 @@ bool TargetSourcesImpl::HandleFileSetMode( return false; } + if (this->Target->GetType() == cmStateEnums::UTILITY) { + this->SetError("FILE_SETs may not be added to custom targets"); + return false; + } + bool const isDefault = args.Type == args.FileSet || (args.Type.empty() && args.FileSet[0] >= 'A' && args.FileSet[0] <= 'Z'); std::string type = isDefault ? args.FileSet : args.Type; |