[cmake-developers] [CMake 0012999]: Metachars should be escaped before embedding paths into the regex

Mantis Bug Tracker mantis at public.kitware.com
Sun Feb 26 18:06:35 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12999 
====================================================================== 
Reported By:                Modestas Vainius
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12999
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-02-26 18:06 EST
Last Modified:              2012-02-26 18:06 EST
====================================================================== 
Summary:                    Metachars should be escaped before embedding paths
into the regex
Description: 
${CMake_SOURCE_DIR} and ${CMake_BINARY_DIR} cannot be embedded into regex
directly. If they contain special regex metacharacters like +, the regex
will break. This could be fixed by escaping such metacharacters with a backslash
before embedding the path into the regex (patch attached). Maybe it's even worth
adding a subroutine to STRING command which does escaping, isn't it?

The issue affects the following tests: CTestTestConfigFileInBuildDir1 and
CTestTestConfigFileInBuildDir2.

The build log exhibiting the problem can be found at
https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=mipsel&ver=2.8.7-2%2Bb1&stamp=1330241990
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-02-26 18:06 Modestas VainiusNew Issue                                    
2012-02-26 18:06 Modestas VainiusFile Added:
paths_in_regex_espace_metachars.diff                    
======================================================================




More information about the cmake-developers mailing list