@@ -250,7 +250,7 @@ static int write_vcxproj(const std::string &proj_name, const std::function<void(
250250 return EXIT_SUCCESS;
251251}
252252
253- enum ClType : std::uint8_t { Compile, Include, Precompile };
253+ enum ClType : std::uint8_t { Compile, Include, Precompile, NoPch };
254254
255255static std::string make_vcxproj_cl_entry (const std::string& file, ClType type)
256256{
@@ -271,6 +271,18 @@ static std::string make_vcxproj_cl_entry(const std::string& file, ClType type)
271271 outstr += " </ClCompile>\r\n " ;
272272 return outstr;
273273 }
274+ if (type == NoPch) {
275+ outstr += R"( <ClCompile Include=")" ;
276+ outstr += file;
277+ outstr += R"( ">)" ;
278+ outstr += " \r\n " ;
279+ outstr += R"( <PrecompiledHeader>NotUsing</PrecompiledHeader>)" ;
280+ outstr += " \r\n " ;
281+ outstr += R"( <ForcedIncludeFiles></ForcedIncludeFiles>)" ;
282+ outstr += " \r\n " ;
283+ outstr += " </ClCompile>\r\n " ;
284+ return outstr;
285+ }
274286 outstr += " <" ;
275287 outstr += (type == Compile) ? " ClCompile" : " ClInclude" ;
276288 outstr += R"( Include=")" ;
@@ -542,8 +554,8 @@ int main(int argc, char **argv)
542554 });
543555
544556 write_vcxproj (" lib/cppcheck.vcxproj" , [&](std::string &outstr){
545- outstr += make_vcxproj_cl_entry (R"( ..\externals\simplecpp\simplecpp.cpp)" , Compile );
546- outstr += make_vcxproj_cl_entry (R"( ..\externals\tinyxml2\tinyxml2.cpp)" , Compile );
557+ outstr += make_vcxproj_cl_entry (R"( ..\externals\simplecpp\simplecpp.cpp)" , NoPch );
558+ outstr += make_vcxproj_cl_entry (R"( ..\externals\tinyxml2\tinyxml2.cpp)" , NoPch );
547559
548560 for (const std::string &libfile: libfiles_prio) {
549561 const std::string l = libfile.substr (4 );
0 commit comments