diff options
author | stopiccot <devnull@localhost> | 2012-10-24 20:59:23 (GMT) |
---|---|---|
committer | stopiccot <devnull@localhost> | 2012-10-24 20:59:23 (GMT) |
commit | a9145df8c3056bc0daae495aac1280ad6ac95394 (patch) | |
tree | e48416a34af5363e9b287b64b8ad02450addd017 | |
parent | 6f33c11e7a3c5bc42e1543d303e3512c1c2d2b48 (diff) | |
download | SCons-a9145df8c3056bc0daae495aac1280ad6ac95394.zip SCons-a9145df8c3056bc0daae495aac1280ad6ac95394.tar.gz SCons-a9145df8c3056bc0daae495aac1280ad6ac95394.tar.bz2 |
vcxproj.filters files should be removed upon clean
-rw-r--r-- | src/engine/SCons/Tool/msvs.py | 4 | ||||
-rw-r--r-- | test/MSVS/vs-10.0-files.py | 12 | ||||
-rw-r--r-- | 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) |