Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,235
    • Issues 3,235
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 14
    • Merge Requests 14
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #17686

Closed
Open
Opened Jan 26, 2018 by Brad King@brad.kingOwner

Replace regex implementation using C++11

CMake's current regex infrastructure is based on an ancient third-party implementation and has some limitations:

  • Capture groups limited to about 10.
  • Slow, as discussed on the dev list in Nov 2011: slow regex implementation in RegularExpression.
  • Matching needs a lot of stack space (#17659 (closed), #17924).
  • Only recently made thread-safe by utils/kwsys!72 (merged).

Fortunately we now use C++11 which provides the <regex> feature. We should investigate using it as a replacement.

The main challenge is compatibility. I'm not sure whether any of the standard regex syntax modes exactly matches CMake's regex syntax. Since it is public-facing, the regex syntax must be preserved. Therefore we must choose one of the standard regex syntax modes along with an input expression transformation to make the semantics exactly match.

Edited Apr 19, 2018 by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#17686