Commit Graph

96 Commits

Author SHA1 Message Date
Oliver Stöneberg dcc90c6dfa
improved compiler warnings about missing attributes (#3232) 2021-04-25 12:52:09 +02:00
Oliver Stöneberg 9ad7ab4263
use latest available clang-tidy in CI (#3230) 2021-04-24 20:20:09 +02:00
Oliver Stöneberg 5de58c4ddd
added clang-tidy to CI (#3218) 2021-04-18 21:51:47 +02:00
DGarry82 5c102a0b8a
try to find pcre.h for HAVE_RULES in any case (#3185) 2021-03-30 13:37:26 +02:00
Daniel Marjamäki cba0101df5 2.4: Set version 2021-03-21 21:25:54 +01:00
Oliver Stöneberg 491f4874c5
fixed/aligned some compiler warnings (#3065) 2021-01-21 18:13:32 +01:00
Oliver Stöneberg d59abfd977
fixed clang-tidy warnings (#3006)
* clang_tidy.cmake: added clang-tidy-11 to list of executables to look for

* .clang-tidy: disabled warnings we are (currently) not interested in

* fixed clang-tidy warnings
2021-01-02 23:10:27 +01:00
Oliver Stöneberg 30fbded406
enabled precompiled headers for CMake (if supported) and disabled the prologue so includes will not be treated as system one and emit warnings (#2986) 2020-12-27 09:17:57 +01:00
Oliver Stöneberg 0a1012a273
fixed and enabled -Wdocumentation and -Wdocumentation-pedantic clang warnings (#2819) 2020-12-27 09:15:59 +01:00
Oliver Stöneberg fa8a836925
fixed some clang warnings (#2980) 2020-12-26 13:46:28 +01:00
Oliver Stöneberg e141d54ae5
fixed FILESDIR in CMake with Windows file separators (#2977) 2020-12-25 19:57:12 +01:00
Daniel Marjamäki 2a1e230d2e 2.3: Update version 2020-12-05 10:00:02 +01:00
Wolfgang Stöggl 8ac55a8534
Add find_package(tinyxml2) to CMake builds (#2691)
So far, the cmake files of Cppcheck needed to be patched in order to
use installed tinyxml2 instead of the bundled version of tinyxml2.
- Introduce the CMake option USE_BUNDLED_TINYXML2 with a default value
  of ON. This preserves the behavior as in the past and uses the
  bundled version under externals/tinyxml2 by default.
- Usage of the installed tinyxml2 version of a system can be enabled
  now using -DUSE_BUNDLED_TINYXML2=OFF as a cmake parameter.
- Some Linux distros do not install tinyxml2*.cmake files, which are
  required to find tinyxml2 using find_package().
  Try first using find_package(tinyxml2 QUIET) and if this fails, try
  again using find_library(tinyxml2_LIBRARY tinyxml2)
2020-11-22 08:57:07 +01:00
abhijit-sawant 8d600fde12
Updated cmake script so cppcheck.exe works in place during development (#2895)
Moved -DFILESDIR out of Linux only block so FILESDIR is defined for Windows too
2020-11-11 07:54:01 +01:00
Oliver Stöneberg 488813d00f
added validateCFG and checkcfg targets to CMake / some refactorings (#2687) 2020-11-02 20:16:15 +01:00
Daniel Marjamäki 2e20ee9e39 set version 2.2.99 2020-10-03 13:54:17 +02:00
Daniel Marjamäki c373be0b16 2.2: Update versions 2020-10-03 10:47:35 +02:00
Oliver Stöneberg dae37f1c9f
disabled precompiled headers in CMake as they currently do not emit any compiler warnings / adjusted check for precompiled header (#2820) 2020-09-23 07:51:21 +02:00
Oliver Stöneberg 1077b0d2a6
small compileroptions.cmake cleanup (#2817)
* compileroptions.cmake: moved common warnings to proper scope and aligned them with other build systems / fixed some -Wrange-loop-construct clang warnings

* compileroptions.cmake: use check_cxx_compiler_flag() via add_compile_options_safe() helper to avoid compiler version checks
2020-09-21 19:41:28 +02:00
Daniel Marjamäki 3ebd97c448 cmake: disable -Wno-maybe-uninitialized. There can be false positives and therefore this is not working well together with -Werror option. 2020-08-21 17:17:49 +02:00
Frank Zingsheim 686a1bec99 GUI: Add online help (CMake) 2020-07-26 00:22:28 +02:00
Paul 18a8b5bc65 Add option to disable pch since its broken with ccache 2020-06-24 18:41:16 -05:00
Daniel Marjamäki 97fd51edd1 Set version to 2.1.99 / 2.2 dev 2020-06-14 07:16:14 +02:00
Daniel Marjamäki 026bbac975 2.1: Set version 2020-06-13 17:04:26 +02:00
Oliver Stöneberg 3a90341961
some CMake cleanups and additions (#2639) 2020-05-27 05:15:46 +02:00
Oliver Stöneberg c1f762b861
disabled some Visual Studio warnings (#2635) 2020-05-23 17:42:56 +02:00
Daniel Marjamäki 275c8e84d2 Set development version 2.0.99 2020-05-15 11:15:34 +02:00
Daniel Marjamäki 809a769c69 Try to make Travis happy 2020-05-10 15:38:01 +02:00
Daniel Marjamäki dc32f428ff Set Cppcheck version 2020-05-10 11:28:31 +02:00
Oliver Stöneberg 04bd2bdb74
some sanitizer build fixes and cleanups (#2621)
* cleaned up sanitizer build flags

* exprengine.cpp: work around linker error with Clang and UBSAN
2020-04-24 21:17:06 +02:00
Oliver Stöneberg 1388e9385b
cleaned up setting of compiler options and a few more things in CMake (#2599)
* cleaned up compiler options related code in CMake

* moved cmake_minimum_required() and raised to latest 2.8.x version

* use proper compiler version check / print compiler version

* fixed linking of sanitized builds

* added proper version checks to newer Clang warnings and enabled them / moved tinyxml_objs flags to proper compiler

* disabled -Wdeprecated-declarations for Clang

* compileroptions.cmake: removed unnecessary check for clang++ existence - CMAKE_CXX_COMPILER_ID is determined by CMake

* printInfo.cmake: removed unnecessary message for ANALYZE_ADDRESS - LSAN is part of ASAN and enabled by default

* cleaned up if() comparisons in CMake

* added/adjusted TODOs
2020-04-22 11:04:19 +02:00
Oliver Stöneberg 1af959af2c
fixed -Wextra-semi-stmt Clang warnings (#2553)
* fixed -Wextra-semi-stmt Clang warnings

* adjusted REDIRECT macro to require a semicolon

* testmathlib.cpp: rolled back accidental change
2020-04-21 17:27:51 +02:00
Oliver Stöneberg e3b644d877
aligned GCC warnings (#2592)
* excluded oss-fuzz related CMake targets from all

* checkstl.cpp: fixed -Wmissing-declarations warning

* suppress -Wsuggest-attribute=format GCC warnings for tinyxml in CMake for now

* aligned GCC warnings in dmake, CMake and Travis / removed now useless WARNINGS_ANSI_ISO
2020-04-08 14:56:12 +02:00
Oliver Stöneberg 1dd8d4afaf
fixes for Clang and clang-tidy 10 (#2588)
* clang_tidy.cmake: added clang-tidy-10 to program list

* fixed -Wrange-loop-construct Clang warnings

* fixed readability-qualified-auto clang-tidy warnings

* .clang-tidy: actually disable clang-analyzer-* warnings

* .clang-tidy: disabled some new warnings introduced with clang-tidy-10
2020-04-04 11:44:59 +02:00
Oliver Stöneberg 85b050acdf
add a "run-clang-tidy" CMake target when the executable exists (#2567)
* CMakeLists.txt: there is no REQUIRED option for include()

* added a "run-clang-tidy" target when the executable exists / always create compilation database / added .clang-tidy with all existing warnings have been disabled for now
2020-04-02 13:55:49 +02:00
Oliver Stöneberg 8bc4e38213
Disable warnings causing too much noise (#2578)
Co-authored-by: Joachim Reichel <reichel@debian.org>
2020-03-31 08:33:17 +02:00
Sebastian 6e74d6810a
cmake/compileroptions.cmake: Fix missing stack options under Cygwin (#2560)
testrunner fails with SEGFAULT when built with cmake under Cygwin.
This fix adds a compiler option to increase the stack size in the same
way as it is already done in the Makefile.
2020-03-03 18:37:49 +01:00
Oliver Stöneberg 8949c7e569
added CMake option ENABLE_CHECK_INTERNAL (#2557) 2020-03-01 17:11:20 +01:00
Daniel Marjamäki 7f110f3ec3 Set version 2019-12-21 11:49:01 +01:00
PKEuS e9f8dddabe Set version to 1.89.99/1.90 dev 2019-09-02 15:44:40 +02:00
Daniel Marjamäki 4ede39a9b7 1.89: Set version 2019-09-01 12:16:33 +02:00
Daniel Marjamäki a17f2a6f05 Compiling/Installing : The CFGDIR parameter was removed. Use FILESDIR instead. 2019-08-17 10:53:07 +02:00
IOBYTE c2ccfd5f8b Increase Windows stack size to 8M (#1998)
* Increase Windows stack size to 8M

* try to add stack size cmake
2019-07-15 12:39:58 +02:00
Daniel Marjamäki 44ba9b5caf cmake: turn off Wconversion and Wsign-promo warnings 2019-07-08 08:09:51 +02:00
PKEuS d74f8c678f Set version to 1.88.99/1.89 dev 2019-07-02 20:59:52 +02:00
Daniel Marjamäki faaabc74a7 Set version 1.88 2019-06-29 08:38:13 +02:00
Carlo Marcelo Arenas Belón ec4e43767e minor improvements (#1929)
* lib: isNonBoolStdType no longer needed

lib/checkbool.cpp:50:13: warning: unused function 'isNonBoolStdType'
      [-Wunused-function]
static bool isNonBoolStdType(const Variable* var)

* cmake: C++11 is required

also change instructions to a more common syntax
2019-06-28 06:57:05 +02:00
Scott Furry fc61596c40 Adjustments to CMake Building (#1925)
From CMake Docs( https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html ),
BUILD_SHARED_LIBS may not be defined. This can result in printinfo.cmake outputing
variable without a value. A conditional is applied to ensure that some output is
provided to the user should variable not be defined.

Removed explicit C++ standard flag. Any setting user would add on the command
line would be replaced due to ordering. `-std=c++0x` would be last value added
to CMAKE_CXX_FLAGS and ultimately the one used by the compiler.
2019-06-26 07:41:48 +02:00
Scott Furry dc5a38e61c Modify Qt5 CMake and include Qt Charts Option (#1837)
Update CMake search for Qt5 componets to be consistent
with recommended practice from Kitware.
(see https://blog.kitware.com/cmake-finding-qt5-the-right-way/)

Incorporate ability to build cppcheck-gui with Qt Charts
via CMake switch. Option "WITH_QCHARTS" will enable
search for Qt Charts to Qt5 component search and add
build flag "HAVE_QCHART".
2019-05-17 10:17:51 +02:00
Carlo Marcelo Arenas Belón bf5c71bdca sync (#1835)
* build: remove -Wabi and add -Wundef

gcc >= 8 throws a warning about -Wabi (without a specific ABI version)
being ignored, while -Wundef seems more useful (as shown by the change
in config.h, which was probably an unfortunate typo)

travis.yaml should probably be updated soon, but was left out from this
change as the current images don't yet need it

* lib: unused function in valueflow

refactored out since 8c03be3212

lib/valueflow.cpp:3124:21: warning: unused function 'endTemplateArgument' [-Wunused-function]

* readme: include picojson

* make: also clean exe
2019-05-17 09:31:41 +02:00