From f01ca85c7163b9e17c1c523105c43abeff0a73fc Mon Sep 17 00:00:00 2001 From: firewave Date: Mon, 2 Feb 2026 12:33:03 +0100 Subject: [PATCH] cppcheck.vcxproj: do not use precompiled header for `externals` sources this fixes the conflict between functions with the same name in Cppcheck and simplecpp --- lib/cppcheck.vcxproj | 10 ++++++++-- tools/dmake/dmake.cpp | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/cppcheck.vcxproj b/lib/cppcheck.vcxproj index d0175b2997f..b0e52a814fe 100644 --- a/lib/cppcheck.vcxproj +++ b/lib/cppcheck.vcxproj @@ -18,8 +18,14 @@ - - + + NotUsing + + + + NotUsing + + diff --git a/tools/dmake/dmake.cpp b/tools/dmake/dmake.cpp index 100e32b6b5b..f8869f2eba7 100644 --- a/tools/dmake/dmake.cpp +++ b/tools/dmake/dmake.cpp @@ -250,7 +250,7 @@ static int write_vcxproj(const std::string &proj_name, const std::function)"; + outstr += "\r\n"; + outstr += R"( NotUsing)"; + outstr += "\r\n"; + outstr += R"( )"; + outstr += "\r\n"; + outstr += " \r\n"; + return outstr; + } outstr += " <"; outstr += (type == Compile) ? "ClCompile" : "ClInclude"; outstr += R"( Include=")"; @@ -542,8 +554,8 @@ int main(int argc, char **argv) }); write_vcxproj("lib/cppcheck.vcxproj", [&](std::string &outstr){ - outstr += make_vcxproj_cl_entry(R"(..\externals\simplecpp\simplecpp.cpp)", Compile); - outstr += make_vcxproj_cl_entry(R"(..\externals\tinyxml2\tinyxml2.cpp)", Compile); + outstr += make_vcxproj_cl_entry(R"(..\externals\simplecpp\simplecpp.cpp)", NoPch); + outstr += make_vcxproj_cl_entry(R"(..\externals\tinyxml2\tinyxml2.cpp)", NoPch); for (const std::string &libfile: libfiles_prio) { const std::string l = libfile.substr(4);