From e4f095d3ba2ac29ccbc00f44306c65d0d4ee678f Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@otacoo.com>
Date: Tue, 25 Nov 2014 20:35:55 -0800
Subject: [PATCH] Allow detection of c++ files in MSVC scripts for extensions

This makes possible the detection of c++ files (cpp, lpp, ypp) for
extensions copied in contrib/ and built with MSVC, be it MS or VC.
---
 src/tools/msvc/MSBuildProject.pm | 2 +-
 src/tools/msvc/VCBuildProject.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
index e1c8d81..d33c8ae 100644
--- a/src/tools/msvc/MSBuildProject.pm
+++ b/src/tools/msvc/MSBuildProject.pm
@@ -127,7 +127,7 @@ EOF
 	foreach my $fileNameWithPath (sort keys %{ $self->{files} })
 	{
 		confess "Bad format filename '$fileNameWithPath'\n"
-		  unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.[r]?[cyl]$/);
+		  unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.(c|cpp|l|lpp|rc|y|ypp)$/);
 		my $dir      = $1;
 		my $fileName = $2;
 		if ($fileNameWithPath =~ /\.y$/ or $fileNameWithPath =~ /\.l$/)
diff --git a/src/tools/msvc/VCBuildProject.pm b/src/tools/msvc/VCBuildProject.pm
index 335a1f0..af68528 100644
--- a/src/tools/msvc/VCBuildProject.pm
+++ b/src/tools/msvc/VCBuildProject.pm
@@ -71,7 +71,7 @@ EOF
 	foreach my $fileNameWithPath (sort keys %{ $self->{files} })
 	{
 		confess "Bad format filename '$fileNameWithPath'\n"
-		  unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.[r]?[cyl]$/);
+		  unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.(c|cpp|l|lpp|rc|y|ypp)$/);
 		my $dir  = $1;
 		my $file = $2;
 
-- 
2.1.3

