diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index 2d1dccd0..80dad946 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -394,6 +394,11 @@ for _, file in ipairs(files) do _x(2,'', path.translate(file.fullpath)) for cfg in project.eachconfig(prj) do + local filecfg = config.getfileconfig(cfg, file.abspath) + if not filecfg then + _p(3,'true', vc2010.condition(cfg)) + end + if pchsource == file.fullpath and not cfg.flags.NoPCH then _p(3,'Create', vc2010.condition(cfg)) end diff --git a/tests/actions/vstudio/vc2010/test_files.lua b/tests/actions/vstudio/vc2010/test_files.lua index 547dec2a..5f130ddf 100755 --- a/tests/actions/vstudio/vc2010/test_files.lua +++ b/tests/actions/vstudio/vc2010/test_files.lua @@ -88,3 +88,22 @@ ]] end + + +-- +-- If a file is excluded from a configuration, make sure it is marked as such. +-- + + function suite.excludedFromBuild_onExcludedFile() + files { "hello.cpp" } + configuration "Debug" + removefiles { "hello.cpp" } + prepare() + test.capture [[ + + + true + + + ]] + end