diff --git a/src/actions/vstudio/vs200x_vcproj.lua b/src/actions/vstudio/vs200x_vcproj.lua index e42e8cc4..478b0697 100644 --- a/src/actions/vstudio/vs200x_vcproj.lua +++ b/src/actions/vstudio/vs200x_vcproj.lua @@ -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 diff --git a/tests/actions/vstudio/vc200x/test_files.lua b/tests/actions/vstudio/vc200x/test_files.lua index 840c4a86..d503bcae 100644 --- a/tests/actions/vstudio/vc200x/test_files.lua +++ b/tests/actions/vstudio/vc200x/test_files.lua @@ -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 [[ + + + +