Added support at the file level for the NoPCH flag in VS200x projects

This commit is contained in:
Sam Surtees 2017-05-05 02:20:45 +10:00
parent 347c9c418d
commit 43824fa22c
2 changed files with 26 additions and 0 deletions

View File

@ -1609,6 +1609,8 @@
prj.system == p.WINDOWS
then
p.w('UsePrecompiledHeader="1"')
elseif file.flags.NoPCH then
p.w('UsePrecompiledHeader="0"')
end
else
if not prj.flags.NoPCH and prj.pchheader then

View File

@ -205,6 +205,30 @@
end
--
-- A file flagged with NoPCH should be marked as such.
--
function suite.useNoPCHFlag()
files { "test.cpp" }
filter { "files:test.cpp" }
flags { "NoPCH" }
prepare()
test.capture [[
<Files>
<File
RelativePath="test.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
]]
end
--
-- A file excluded from a specific configuration should be marked as such.
--