Add per-configuration file lists for VC2010
This commit is contained in:
parent
dac18c990b
commit
7350cc73dd
@ -394,6 +394,11 @@
|
||||
for _, file in ipairs(files) do
|
||||
_x(2,'<ClCompile Include=\"%s\">', path.translate(file.fullpath))
|
||||
for cfg in project.eachconfig(prj) do
|
||||
local filecfg = config.getfileconfig(cfg, file.abspath)
|
||||
if not filecfg then
|
||||
_p(3,'<ExcludedFromBuild %s>true</ExcludedFromBuild>', vc2010.condition(cfg))
|
||||
end
|
||||
|
||||
if pchsource == file.fullpath and not cfg.flags.NoPCH then
|
||||
_p(3,'<PrecompiledHeader %s>Create</PrecompiledHeader>', vc2010.condition(cfg))
|
||||
end
|
||||
|
@ -88,3 +88,22 @@
|
||||
</ItemGroup>
|
||||
]]
|
||||
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 [[
|
||||
<ItemGroup>
|
||||
<ClCompile Include="hello.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
]]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user