mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-03 05:08:47 -06:00
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user