Merge pull request #778 from LORgames/ssurtees/vs200xNoPCH

Added support at the file level for the NoPCH flag in VS200x projects
This commit is contained in:
Tom van Dijck 2017-05-04 10:14:00 -07:00 committed by GitHub
commit 6475e2a307
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.
--