Created
June 26, 2023 13:16
-
-
Save iamazeem/064c8014f218bc95d3c36954fb867242 to your computer and use it in GitHub Desktop.
CppCheck 2.11 on Ubuntu 18.04 (build from source)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# uninstall existing cppcheck | |
sudo apt purge cppcheck -y | |
# download, build and install | |
cd ~/Downloads | |
wget https://github.com/danmar/cppcheck/archive/refs/tags/2.11.tar.gz | |
tar -xvf 2.11.tar.gz | |
cd cppcheck-2.11 | |
g++ -o cppcheck -std=c++11 -static -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 cli/*.cpp lib/*.cpp externals/simplecpp/simplecpp.cpp externals/tinyxml2/*.cpp -lpthread | |
sudo cp -f cppcheck cfg/std.cfg /usr/local/bin/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment