diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-02-06 12:32:15 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-02-07 15:21:08 (GMT) |
commit | 7c0ec75cfa6860b53036fe46c005b84277cdbc24 (patch) | |
tree | 830a43484968760685ca2eeb07a5777d91f87a5e /Source/cmTargetLinkLibrariesCommand.cxx | |
parent | 92e98dd909bd399f508ff7c2f9657095ddc766cc (diff) | |
download | CMake-7c0ec75cfa6860b53036fe46c005b84277cdbc24.zip CMake-7c0ec75cfa6860b53036fe46c005b84277cdbc24.tar.gz CMake-7c0ec75cfa6860b53036fe46c005b84277cdbc24.tar.bz2 |
De-duplicate validation of genex target names.
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index fab3306..9dd0e5b 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmTargetLinkLibrariesCommand.h" +#include "cmGeneratorExpression.h" + const char* cmTargetLinkLibrariesCommand::LinkLibraryTypeNames[3] = { "general", @@ -271,9 +273,8 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib, { const bool isGenex = cmGeneratorExpression::Find(lib) != std::string::npos; - cmsys::RegularExpression targetNameValidator; - targetNameValidator.compile("^[A-Za-z0-9_.:-]+$"); - const bool potentialTargetName = targetNameValidator.find(lib); + const bool potentialTargetName + = cmGeneratorExpression::IsValidTargetName(lib); if (potentialTargetName || isGenex) { |