From a9145df8c3056bc0daae495aac1280ad6ac95394 Mon Sep 17 00:00:00 2001 From: stopiccot Date: Wed, 24 Oct 2012 23:59:23 +0300 Subject: vcxproj.filters files should be removed upon clean --- src/engine/SCons/Tool/msvs.py | 4 ++++ test/MSVS/vs-10.0-files.py | 12 ++++++++---- test/MSVS/vs-11.0-files.py | 12 ++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index b10868f..211f9dc 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -1654,6 +1654,10 @@ def projectEmitter(target, source, env): t, s = solutionEmitter(target, target, env) targetlist = targetlist + t + # Beginning with Visual Studio 2010 for each project file (.vcxproj) we have additional file (.vcxproj.filters) + if env['MSVS_VERSION'] >= 10.0: + targetlist.append(targetlist[0] + '.filters') + return (targetlist, sourcelist) def solutionEmitter(target, source, env): diff --git a/test/MSVS/vs-10.0-files.py b/test/MSVS/vs-10.0-files.py index 43ce243..8cdc152 100644 --- a/test/MSVS/vs-10.0-files.py +++ b/test/MSVS/vs-10.0-files.py @@ -53,10 +53,11 @@ test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch}) test.run(arguments="Test.vcxproj") test.must_exist(test.workpath('Test.vcxproj')) -vcproj = test.read('Test.vcxproj', 'r') +test.must_exist(test.workpath('Test.vcxproj.filters')) +vcxproj = test.read('Test.vcxproj', 'r') expect = test.msvs_substitute(expected_vcprojfile, '10.0', None, 'SConstruct') # don't compare the pickled data -assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) +assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj) test.must_exist(test.workpath('Test.sln')) sln = test.read('Test.sln', 'r') @@ -67,16 +68,19 @@ assert sln[:len(expect)] == expect, test.diff_substr(expect, sln) test.run(arguments='-c .') test.must_not_exist(test.workpath('Test.vcxproj')) +test.must_not_exist(test.workpath('Test.vcxproj.filters')) test.must_not_exist(test.workpath('Test.sln')) test.run(arguments='Test.vcxproj') test.must_exist(test.workpath('Test.vcxproj')) +test.must_exist(test.workpath('Test.vcxproj.filters')) test.must_exist(test.workpath('Test.sln')) test.run(arguments='-c Test.sln') test.must_not_exist(test.workpath('Test.vcxproj')) +test.must_not_exist(test.workpath('Test.vcxproj.filters')) test.must_not_exist(test.workpath('Test.sln')) @@ -89,11 +93,11 @@ python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1]) test.run(arguments='Test.vcxproj') test.must_exist(test.workpath('Test.vcxproj')) -vcproj = test.read('Test.vcxproj', 'r') +vcxproj = test.read('Test.vcxproj', 'r') expect = test.msvs_substitute(expected_vcprojfile, '10.0', None, 'SConstruct', python=python) # don't compare the pickled data -assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) +assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj) diff --git a/test/MSVS/vs-11.0-files.py b/test/MSVS/vs-11.0-files.py index 53d8271..6c4933c 100644 --- a/test/MSVS/vs-11.0-files.py +++ b/test/MSVS/vs-11.0-files.py @@ -53,10 +53,11 @@ test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch}) test.run(arguments="Test.vcxproj") test.must_exist(test.workpath('Test.vcxproj')) -vcproj = test.read('Test.vcxproj', 'r') +test.must_exist(test.workpath('Test.vcxproj.filters')) +vcxproj = test.read('Test.vcxproj', 'r') expect = test.msvs_substitute(expected_vcprojfile, '11.0', None, 'SConstruct') # don't compare the pickled data -assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) +assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj) test.must_exist(test.workpath('Test.sln')) sln = test.read('Test.sln', 'r') @@ -67,16 +68,19 @@ assert sln[:len(expect)] == expect, test.diff_substr(expect, sln) test.run(arguments='-c .') test.must_not_exist(test.workpath('Test.vcxproj')) +test.must_not_exist(test.workpath('Test.vcxproj.filters')) test.must_not_exist(test.workpath('Test.sln')) test.run(arguments='Test.vcxproj') test.must_exist(test.workpath('Test.vcxproj')) +test.must_exist(test.workpath('Test.vcxproj.filters')) test.must_exist(test.workpath('Test.sln')) test.run(arguments='-c Test.sln') test.must_not_exist(test.workpath('Test.vcxproj')) +test.must_not_exist(test.workpath('Test.vcxproj.filters')) test.must_not_exist(test.workpath('Test.sln')) @@ -89,11 +93,11 @@ python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1]) test.run(arguments='Test.vcxproj') test.must_exist(test.workpath('Test.vcxproj')) -vcproj = test.read('Test.vcxproj', 'r') +vcxproj = test.read('Test.vcxproj', 'r') expect = test.msvs_substitute(expected_vcprojfile, '11.0', None, 'SConstruct', python=python) # don't compare the pickled data -assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) +assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj) -- cgit v0.12