[cmake-developers] [CMake 0015407]: source_group: Multiple REGEX and Checking

Mantis Bug Tracker mantis at public.kitware.com
Tue Feb 17 09:17:04 EST 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15407 
====================================================================== 
Reported By:                S. Paris
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15407
Category:                   CMake
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-02-17 09:17 EST
Last Modified:              2015-02-17 09:17 EST
====================================================================== 
Summary:                    source_group: Multiple REGEX and Checking
Description: 
It would be really convenient to have the possibility for source_group to:
1. Specify multiple regular expressions in one or multiple commands:
   source_group("foo" REGULAR_EXPRESSIONS reg0 reg1)
   source_group("foo" REGULAR_EXPRESSION reg2)
   # Would result in "foo" being selected for files matching reg0, reg1, or reg2
2. Check if a source_group has been specified:
   get_source_group("foo" FILES result0 REGULAR_EXPRESSION result1)
   # Would fill result0 with the files defined for "foo" and result1 with the
regexps defined for "foo"

Steps to Reproduce: 
source_group("foo" REGULAR_EXPRESSION reg0)
source_group("foo" REGULAR_EXPRESSION reg1)
# from here "foo" group will not be selected anymore for files matching reg0 but
not reg1

Additional Information: 
1. should really be a piece of cake to implement, just make
"cmsys::RegularExpression GroupRegex" in cmSourceGroup.h a
"std::set<cmsys::RegularExpression>" as it is for GroupFiles; update
cmSourceGroupCommand.cxx accordingly.

2. is using Makefile->GetSourceGroup() and is even simpler to implement isn't
it?
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-02-17 09:17 S. Paris       New Issue                                    
======================================================================



More information about the cmake-developers mailing list