summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-06 12:32:15 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-02-07 15:21:08 (GMT)
commit7c0ec75cfa6860b53036fe46c005b84277cdbc24 (patch)
tree830a43484968760685ca2eeb07a5777d91f87a5e /Source/cmTargetLinkLibrariesCommand.cxx
parent92e98dd909bd399f508ff7c2f9657095ddc766cc (diff)
downloadCMake-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.cxx7
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)
{