mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
Deduplicate the isGeneratorExpression method.
This API seems like the most appropriate.
This commit is contained in:
@@ -264,20 +264,12 @@ static std::string compileProperty(cmTarget *tgt, const std::string &lib,
|
||||
return tgt->GetDebugGeneratorExpressions(value, llt);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static bool isGeneratorExpression(const std::string &lib)
|
||||
{
|
||||
const std::string::size_type openpos = lib.find("$<");
|
||||
return (openpos != std::string::npos)
|
||||
&& (lib.find(">", openpos) != std::string::npos);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void
|
||||
cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
|
||||
cmTarget::LinkLibraryType llt)
|
||||
{
|
||||
const bool isGenex = isGeneratorExpression(lib);
|
||||
const bool isGenex = cmGeneratorExpression::Find(lib) != std::string::npos;
|
||||
|
||||
cmsys::RegularExpression targetNameValidator;
|
||||
targetNameValidator.compile("^[A-Za-z0-9_.:-]+$");
|
||||
|
||||
Reference in New Issue
Block a user