Added support for per-file NoPCH flag in the VS2010 generator (João Matos)
This commit is contained in:
parent
d1eb67d43b
commit
2e08d5f218
@ -1005,6 +1005,8 @@
|
|||||||
if filecfg then
|
if filecfg then
|
||||||
if cfg.pchsource == filecfg.abspath and not cfg.flags.NoPCH then
|
if cfg.pchsource == filecfg.abspath and not cfg.flags.NoPCH then
|
||||||
vc2010.element(3, 'PrecompiledHeader', condition, 'Create')
|
vc2010.element(3, 'PrecompiledHeader', condition, 'Create')
|
||||||
|
elseif filecfg.flags.NoPCH then
|
||||||
|
vc2010.element(3, 'PrecompiledHeader', condition, 'NotUsing')
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if not cfg.flags.NoPCH and cfg.pchheader then
|
if not cfg.flags.NoPCH and cfg.pchheader then
|
||||||
|
@ -303,3 +303,23 @@
|
|||||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Check handling of per-file no PCH build options.
|
||||||
|
--
|
||||||
|
|
||||||
|
function suite.excludedFromPCH()
|
||||||
|
files { "hello.cpp" }
|
||||||
|
configuration "**.cpp"
|
||||||
|
flags { "NoPCH" }
|
||||||
|
prepare()
|
||||||
|
test.capture [[
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="hello.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user