From e6ae312a0b24c9c386f4dfff7d1c34162736a657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Thu, 4 May 2023 10:54:19 +0200 Subject: [PATCH] moved more code into `HAVE_RULES` (#4956) * moved more code into `HAVE_RULES` * properly enable all internal and rules code in selfcheck * updated TODOs in selfcheck * testrunner.vcxproj.filters: updated * added missing `Debug-PCRE` and `Release-PCRE` configurations for `testrunner` Visual Studio project * cppcheck.cpp: fixed `useStlAlgorithm` selfcheck warning --- .github/workflows/CI-unixish.yml | 2 +- .github/workflows/asan.yml | 6 +- .github/workflows/tsan.yml | 2 +- .github/workflows/ubsan.yml | 6 +- cppcheck.sln | 16 +-- createrelease | 4 +- lib/cppcheck.cpp | 36 +++--- lib/cppcheck.h | 4 + lib/settings.h | 2 + test/testrunner.vcxproj | 212 +++++++++++++++++++++++++++++++ test/testrunner.vcxproj.filters | 75 +++++++++-- tools/dmake.cpp | 26 ++-- 12 files changed, 325 insertions(+), 66 deletions(-) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index 08094cbfd..42d1bba48 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -452,7 +452,7 @@ jobs: - name: Self check run: | - selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=top5 -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings --check-level=exhaustive" + selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=top5 -D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --error-exitcode=1 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings --check-level=exhaustive" ec=0 # early exit diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index f575ecf21..df2cb0534 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -77,13 +77,13 @@ jobs: make -C cmake.output gui-build-deps triage-build-ui-deps # TODO: this is currently way too slow (~60 minutes) to enable it - # TODO: only fail the step on sanitizer issues + # TODO: only fail the step on sanitizer issues - since we use processes it will only fail the underlying process which will result in an cppcheckError - name: Self check if: false run: | - selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=top5 -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings" + selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=top5 -D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --error-exitcode=1 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings" ec=0 - ./cmake.output/bin/cppcheck $selfcheck_options --addon=naming.json -DCHECK_INTERNAL cli lib || ec=1 + ./cmake.output/bin/cppcheck $selfcheck_options --addon=naming.json cli lib || ec=1 ./cmake.output/bin/cppcheck $selfcheck_options -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui/*.cpp || ec=1 ./cmake.output/bin/cppcheck $selfcheck_options -Icli test/*.cpp tools/*.cpp || ec=1 ./cmake.output/bin/cppcheck $selfcheck_options -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt -Icmake.output/tools/triage -Igui tools/triage/*.cpp cmake.output/tools/triage/*.cpp || ec=1 diff --git a/.github/workflows/tsan.yml b/.github/workflows/tsan.yml index 511f40f45..fc3af1124 100644 --- a/.github/workflows/tsan.yml +++ b/.github/workflows/tsan.yml @@ -81,7 +81,7 @@ jobs: - name: Self check if: false run: | - selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=top5 -D__CPPCHECK__ --error-exitcode=0 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings" + selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=top5 -D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --error-exitcode=0 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings" ec=0 ./cmake.output/bin/cppcheck $selfcheck_options --addon=naming.json -DCHECK_INTERNAL cli lib || ec=1 ./cmake.output/bin/cppcheck $selfcheck_options -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui/*.cpp || ec=1 diff --git a/.github/workflows/ubsan.yml b/.github/workflows/ubsan.yml index 55edb8982..1de89f66f 100644 --- a/.github/workflows/ubsan.yml +++ b/.github/workflows/ubsan.yml @@ -74,12 +74,12 @@ jobs: make -C cmake.output autogen make -C cmake.output gui-build-deps triage-build-ui-deps - # TODO: only fail the step on sanitizer issues + # TODO: only fail the step on sanitizer issues - since we use processes it will only fail the underlying process which will result in an cppcheckError - name: Self check run: | - selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=top5 -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings" + selfcheck_options="-q -j$(nproc) --std=c++11 --template=selfcheck --showtime=top5 -D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --error-exitcode=1 --inline-suppr --suppressions-list=.selfcheck_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings" ec=0 - ./cmake.output/bin/cppcheck $selfcheck_options --addon=naming.json -DCHECK_INTERNAL cli lib || ec=1 + ./cmake.output/bin/cppcheck $selfcheck_options --addon=naming.json cli lib || ec=1 ./cmake.output/bin/cppcheck $selfcheck_options -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui/*.cpp || ec=1 ./cmake.output/bin/cppcheck $selfcheck_options -Icli test/*.cpp tools/*.cpp || ec=1 ./cmake.output/bin/cppcheck $selfcheck_options -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt -Icmake.output/tools/triage -Igui tools/triage/*.cpp cmake.output/tools/triage/*.cpp || ec=1 diff --git a/cppcheck.sln b/cppcheck.sln index 80fb1b90a..37be3fd4f 100644 --- a/cppcheck.sln +++ b/cppcheck.sln @@ -49,18 +49,18 @@ Global {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug|Win32.Build.0 = Debug|Win32 {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug|x64.ActiveCfg = Debug|x64 {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug|x64.Build.0 = Debug|x64 - {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug-PCRE|Win32.ActiveCfg = Debug|Win32 - {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug-PCRE|Win32.Build.0 = Debug|Win32 - {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug-PCRE|x64.ActiveCfg = Debug|x64 - {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug-PCRE|x64.Build.0 = Debug|x64 + {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug-PCRE|Win32.ActiveCfg = Debug-PCRE|Win32 + {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug-PCRE|Win32.Build.0 = Debug-PCRE|Win32 + {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug-PCRE|x64.ActiveCfg = Debug-PCRE|x64 + {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Debug-PCRE|x64.Build.0 = Debug-PCRE|x64 {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release|Win32.ActiveCfg = Release|Win32 {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release|Win32.Build.0 = Release|Win32 {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release|x64.ActiveCfg = Release|x64 {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release|x64.Build.0 = Release|x64 - {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release-PCRE|Win32.ActiveCfg = Release|Win32 - {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release-PCRE|Win32.Build.0 = Release|Win32 - {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release-PCRE|x64.ActiveCfg = Release|x64 - {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release-PCRE|x64.Build.0 = Release|x64 + {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release-PCRE|Win32.ActiveCfg = Release-PCRE|Win32 + {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release-PCRE|Win32.Build.0 = Release-PCRE|Win32 + {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release-PCRE|x64.ActiveCfg = Release-PCRE|x64 + {4F7DCE5E-6CDE-38C4-9EA7-27AF3B25CEB4}.Release-PCRE|x64.Build.0 = Release-PCRE|x64 {C183DB5B-AD6C-423D-80CA-1F9549555A1A}.Debug|Win32.ActiveCfg = Debug|Win32 {C183DB5B-AD6C-423D-80CA-1F9549555A1A}.Debug|Win32.Build.0 = Debug|Win32 {C183DB5B-AD6C-423D-80CA-1F9549555A1A}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/createrelease b/createrelease index 8ad937ac9..5b879506c 100755 --- a/createrelease +++ b/createrelease @@ -11,7 +11,7 @@ # # self check, fix critical issues: # make clean && make CXXFLAGS=-O2 MATCHCOMPILER=yes -j4 -# ./cppcheck -D__CPPCHECK__ --std=c++11 --library=cppcheck-lib --enable=style --inconclusive --inline-suppr --suppress=bitwiseOnBoolean --suppress=shadowFunction --suppress=useStlAlgorithm --suppress=*:externals/picojson.h --suppress=functionConst --suppress=functionStatic --xml cli gui/*.cpp lib 2> selfcheck.xml +# ./cppcheck -D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --std=c++11 --library=cppcheck-lib --enable=style --inconclusive --inline-suppr --suppress=bitwiseOnBoolean --suppress=shadowFunction --suppress=useStlAlgorithm --suppress=*:externals/picojson.h --suppress=functionConst --suppress=functionStatic --xml cli gui/*.cpp lib 2> selfcheck.xml # # Update translations # lupdate gui.pro @@ -82,7 +82,7 @@ # 2. scp -i ../.ssh/osuosl_id_rsa tools/donate-cpu-server.py danielmarjamaki@cppcheck1.osuosl.org:/var/daca@home/ # # self check, fix stylistic issues: -# ./cppcheck -D__CPPCHECK__ --library=cppcheck-lib --enable=style --inconclusive --inline-suppr --suppress=bitwiseOnBoolean --suppress=shadowFunction --suppress=useStlAlgorithm --suppress=*:externals/picojson.h cli gui/*.cpp lib +# ./cppcheck -D__CPPCHECK__ -DCHECK_INTERNAL -DHAVE_RULES --library=cppcheck-lib --enable=style --inconclusive --inline-suppr --suppress=bitwiseOnBoolean --suppress=shadowFunction --suppress=useStlAlgorithm --suppress=*:externals/picojson.h cli gui/*.cpp lib # # Set debug version (see 803eea912c9512c810a7e78d58bb927d89a6daa1) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 95a3effa6..a0fd3e9e5 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -799,6 +799,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string return 0; } +#ifdef HAVE_RULES // Run define rules on raw code const auto rules_it = std::find_if(mSettings.rules.cbegin(), mSettings.rules.cend(), [](const Settings::Rule& rule) { return rule.tokenlist == "define"; @@ -815,6 +816,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string tokenizer2.list.createTokens(istr2); executeRules("define", tokenizer2); } +#endif if (!mSettings.force && configurations.size() > mSettings.maxConfigs) { if (mSettings.severity.isEnabled(Severity::information)) { @@ -937,10 +939,11 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string if (!mSettings.buildDir.empty()) checkUnusedFunctions.parseTokens(tokenizer, filename.c_str(), &mSettings); +#ifdef HAVE_RULES // handling of "simple" rules has been removed. - // cppcheck-suppress knownConditionTrueFalse if (mSimplify && hasRule("simple")) throw InternalError(nullptr, "Handling of \"simple\" rules has been removed in Cppcheck. Use --addon instead."); +#endif } catch (const simplecpp::Output &o) { // #error etc during preprocessing @@ -1059,8 +1062,12 @@ void CppCheck::internalError(const std::string &filename, const std::string &msg //--------------------------------------------------------------------------- void CppCheck::checkRawTokens(const Tokenizer &tokenizer) { +#ifdef HAVE_RULES // Execute rules for "raw" code executeRules("raw", tokenizer); +#else + (void)tokenizer; +#endif } //--------------------------------------------------------------------------- @@ -1132,27 +1139,21 @@ void CppCheck::checkNormalTokens(const Tokenizer &tokenizer) } } +#ifdef HAVE_RULES executeRules("normal", tokenizer); +#endif } //--------------------------------------------------------------------------- +#ifdef HAVE_RULES bool CppCheck::hasRule(const std::string &tokenlist) const { -#ifdef HAVE_RULES - for (const Settings::Rule &rule : mSettings.rules) { - if (rule.tokenlist == tokenlist) - return true; - } -#else - (void)tokenlist; -#endif - return false; + return std::any_of(mSettings.rules.cbegin(), mSettings.rules.cend(), [&](const Settings::Rule& rule) { + return rule.tokenlist == tokenlist; + }); } - -#ifdef HAVE_RULES - static const char * pcreErrorCodeToString(const int pcreExecRet) { switch (pcreExecRet) { @@ -1282,15 +1283,8 @@ static const char * pcreErrorCodeToString(const int pcreExecRet) return ""; } -#endif // HAVE_RULES - - void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &tokenizer) { - (void)tokenlist; - (void)tokenizer; - -#ifdef HAVE_RULES // There is no rule to execute if (!hasRule(tokenlist)) return; @@ -1413,8 +1407,8 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token } #endif } -#endif } +#endif void CppCheck::executeAddons(const std::string& dumpFile) { diff --git a/lib/cppcheck.h b/lib/cppcheck.h index 02b161cc2..d9b63f02f 100644 --- a/lib/cppcheck.h +++ b/lib/cppcheck.h @@ -142,8 +142,10 @@ public: void removeCtuInfoFiles(const std::map& files); // cppcheck-suppress functionConst // has side effects private: +#ifdef HAVE_RULES /** Are there "simple" rules */ bool hasRule(const std::string &tokenlist) const; +#endif /** @brief There has been an internal error => Report information message */ void internalError(const std::string &filename, const std::string &msg); @@ -180,12 +182,14 @@ private: */ void executeAddonsWholeProgram(const std::map &files); +#ifdef HAVE_RULES /** * @brief Execute rules, if any * @param tokenlist token list to use (normal / simple) * @param tokenizer tokenizer */ void executeRules(const std::string &tokenlist, const Tokenizer &tokenizer); +#endif /** * @brief Errors and warnings are directed here. diff --git a/lib/settings.h b/lib/settings.h index 8d3600163..eb3d4e18b 100644 --- a/lib/settings.h +++ b/lib/settings.h @@ -285,10 +285,12 @@ public: Severity::SeverityType severity; }; +#ifdef HAVE_RULES /** * @brief Extra rules */ std::list rules; +#endif /** Do not only check how interface is used. Also check that interface is safe. */ class CPPCHECKLIB SafeChecks { diff --git a/test/testrunner.vcxproj b/test/testrunner.vcxproj index cd6757f75..799035206 100755 --- a/test/testrunner.vcxproj +++ b/test/testrunner.vcxproj @@ -1,6 +1,14 @@ + + Debug-PCRE + Win32 + + + Debug-PCRE + x64 + Debug Win32 @@ -9,6 +17,14 @@ Debug x64 + + Release-PCRE + Win32 + + + Release-PCRE + x64 + Release Win32 @@ -37,8 +53,12 @@ Create Create + Create + Create Create Create + Create + Create @@ -138,58 +158,112 @@ false v142 + + Application + Unicode + false + v142 + Application Unicode false v142 + + Application + Unicode + false + v142 + Application Unicode false v142 + + Application + Unicode + false + v142 + Application Unicode false v142 + + Application + Unicode + false + v142 + + + + + + + + + + + + + $(SolutionDir)bin\debug\ + $(SolutionDir)bin\debug\ $(SolutionDir)bin\debug\ + $(SolutionDir)bin\debug\ temp\$(Configuration)_$(PlatformName)\ + temp\$(Configuration)_$(PlatformName)\ temp\$(Configuration)_$(PlatformName)\ + temp\$(Configuration)_$(PlatformName)\ testrunner + testrunner testrunner + testrunner true + true true + true $(SolutionDir)bin\ + $(SolutionDir)bin\ $(SolutionDir)bin\ + $(SolutionDir)bin\ temp\$(Configuration)_$(PlatformName)\ + temp\$(Configuration)_$(PlatformName)\ temp\$(Configuration)_$(PlatformName)\ + temp\$(Configuration)_$(PlatformName)\ testrunner + testrunner testrunner + testrunner true + true true + true true + true true + true @@ -221,6 +295,36 @@ 8000000 + + + ..\cli;..\lib;..\externals;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) + true + ProgramDatabase + Disabled + CPPCHECKLIB_IMPORT;SIMPLECPP_IMPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Level4 + 4018;4127;4146;4244;4251;4267;4389;4482;4512;4701;4706;4800;4805 + true + Use + precompiled.h + precompiled.h + true + stdcpp14 + /Zc:throwingNew /Zc:__cplusplus %(AdditionalOptions) + EnableFastChecks + + + shlwapi.lib;%(AdditionalDependencies) + ../externals;%(AdditionalLibraryDirectories) + true + Console + true + true + 8000000 + 8000000 + + ..\cli;..\lib;..\externals;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) @@ -250,6 +354,35 @@ true + + + ..\cli;..\lib;..\externals;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) + true + ProgramDatabase + Disabled + CPPCHECKLIB_IMPORT;SIMPLECPP_IMPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Level4 + 4018;4127;4146;4244;4251;4267;4389;4482;4512;4701;4706;4800;4805 + true + Use + precompiled.h + precompiled.h + true + stdcpp14 + /Zc:throwingNew /Zc:__cplusplus %(AdditionalOptions) + + + shlwapi.lib;%(AdditionalDependencies) + ../externals;%(AdditionalLibraryDirectories) + true + Console + true + 8000000 + 8000000 + true + + ..\cli;..\lib;..\externals;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) @@ -289,6 +422,45 @@ true + + + ..\cli;..\lib;..\externals;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) + false + MaxSpeed + CPPCHECKLIB_IMPORT;SIMPLECPP_IMPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + MultiThreadedDLL + Level4 + AnySuitable + true + Speed + true + true + true + 4018;4127;4146;4244;4251;4267;4389;4482;4512;4701;4706;4800;4805 + ProgramDatabase + true + Use + precompiled.h + precompiled.h + /Zc:throwingNew /Zc:__cplusplus %(AdditionalOptions) + true + stdcpp14 + + + shlwapi.lib;%(AdditionalDependencies) + ../externals;%(AdditionalLibraryDirectories) + false + Console + true + true + true + true + true + 8000000 + 8000000 + true + + ..\cli;..\lib;..\externals;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) @@ -329,6 +501,46 @@ true + + + ..\cli;..\lib;..\externals;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) + false + MaxSpeed + CPPCHECKLIB_IMPORT;SIMPLECPP_IMPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDLL + Level4 + AnySuitable + true + Speed + true + true + true + 4018;4127;4146;4244;4251;4267;4389;4482;4512;4701;4706;4800;4805 + ProgramDatabase + true + Use + precompiled.h + precompiled.h + /Zc:throwingNew /Zc:__cplusplus %(AdditionalOptions) + true + stdcpp14 + + + shlwapi.lib;%(AdditionalDependencies) + ../externals;%(AdditionalLibraryDirectories) + true + true + true + Console + true + true + true + true + 8000000 + 8000000 + true + + \ No newline at end of file diff --git a/test/testrunner.vcxproj.filters b/test/testrunner.vcxproj.filters index fe61875f4..db85b4d9e 100644 --- a/test/testrunner.vcxproj.filters +++ b/test/testrunner.vcxproj.filters @@ -91,18 +91,12 @@ Source Files - - Source Files - Source Files Source Files - - Source Files - Source Files @@ -226,6 +220,42 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + @@ -234,12 +264,6 @@ Header Files - - Header Files - - - Header Files - Header Files @@ -252,5 +276,32 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + \ No newline at end of file diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 3bf381325..bcac21f0d 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -221,12 +221,12 @@ static int write_vcxproj(const std::string &proj_name, const std::function)"; @@ -235,22 +235,18 @@ static std::string make_vcxproj_cl_entry(const std::string& file, ClType type) outstr += "\r\n"; outstr += R"( Create)"; outstr += "\r\n"; - if (type == Precompile) { - outstr += R"( Create)"; - outstr += "\r\n"; - outstr += R"( Create)"; - outstr += "\r\n"; - } + outstr += R"( Create)"; + outstr += "\r\n"; + outstr += R"( Create)"; + outstr += "\r\n"; outstr += R"( Create)"; outstr += "\r\n"; outstr += R"( Create)"; outstr += "\r\n"; - if (type == Precompile) { - outstr += R"( Create)"; - outstr += "\r\n"; - outstr += R"( Create)"; - outstr += "\r\n"; - } + outstr += R"( Create)"; + outstr += "\r\n"; + outstr += R"( Create)"; + outstr += "\r\n"; outstr += " \r\n"; return outstr; } @@ -383,7 +379,7 @@ int main(int argc, char **argv) for (const std::string &testfile: testfiles) { const std::string t = testfile.substr(5); - outstr += make_vcxproj_cl_entry(t, t == "fixture.cpp" ? PrecompileNoPCRE : Compile); + outstr += make_vcxproj_cl_entry(t, t == "fixture.cpp" ? Precompile : Compile); } }, [&](std::string &outstr){ for (const std::string &clifile_h: clifiles_h) {