Commit Graph

63 Commits

Author SHA1 Message Date
Oliver Stöneberg dd869cf808
added CMake option `EXTERNALS_AS_SYSTEM` to treat external includes as `SYSTEM` ones (#5386)
Although these files are part of our repo changes are being done via
their original projects so it might make sense to treat these as system
includes for some people instead of local ones.

Co-authored-by: Daniel Marjamäki <daniel.marjamaki@gmail.com>
2024-01-03 11:05:32 +01:00
Oliver Stöneberg 347b188726
gui/mainwindow.cpp: use picojson to generate JSON / updated picojson to latest dev version (#5710)
The lastest release of picojson does not support creation of JSONs, so
we need to switch to the current dev version.
2023-12-05 19:02:18 +01:00
Daniel Marjamäki ae3f7bd800
Fixed #12187 (Windows build GUI with cmake) (#5662) 2023-11-15 16:56:46 +01:00
chrchr-github f4030c4b1a
Fix #11791 Build regression with GCC 13 (#5193)
Patch supplied by Joachim Reichel.
2023-06-26 11:15:41 +02:00
Rainer Wiesenfarth f4f58bf020
Fix #11081 GUI: Windows release build crashes (#5083)
* Fix #11081 GUI: Windows release build crashes

Use generator expressions rather than if statements when adding compiler
options or definitions.

* Fix #11081 GUI: Windows CMake debug build fails with default options

When DISABLE_CRTDBG_MAP_ALLOC is using the default value (OFF), the
debug build of cppcheck-gui fails, as the "realloc" method names in some
of the Qt headers are replaced by the macro defined by the compiler.
Thus DISABLE_CRTDBG_MAP_ALLOC is explicitely set when compiling
cppcheck-gui in Debug mode using MSVC.
2023-06-07 11:33:55 +02:00
Oliver Stöneberg 0b8af4fff7
some minor `QtCharts` usage cleanups (#4890) 2023-03-13 15:44:00 +01:00
Oliver Stöneberg 66758d65f9
updated precompiled headers based on `ClangBuildAnalyzer` (#4775) 2023-02-08 08:19:21 +01:00
Oliver Stöneberg a0b1285f4a
added CMake option `BUILD_CORE_DLL` to build lib as `cppcheck-core.dll` with Visual Studio (#4733) 2023-01-26 22:13:07 +01:00
Daniel Marjamäki 94c3108494 GUI: Detect when version is old 2022-10-09 18:51:01 +02:00
Oliver Stöneberg 858585ceb1
disabled all clang-tidy checks for Qt generated files (#4525)
* disabled cll clang-tidy checks for Qt generated files

* enabled `bugprone-suspicious-include` clang-tidy warning
2022-09-30 07:27:03 +02:00
Oliver Stöneberg b3762cd76a
actually perform system tinyxml2 build on macos / fixed system tinyxml2 include (#4445)
* lib/CMakeLists.txt: removed unnecessary external include

* look up tinyxml2 include dir when using system one and specify it

* lib/CMakeLists.txt: do not treat bundled headers as system ones

* CI-unixish.yml: actually perform system tinyxml2 build on macos
2022-09-06 18:30:59 +02:00
Oliver Stöneberg e8b0f12367
replaced `if(MATCHES)` with `if(STREQUAL)` (#4263)
`MATCHES` does regular expression matching which is not the intended behavior here. `Clang` still requires it since it also needs to match `AppleClang.
2022-07-11 10:46:18 +02:00
Oliver Stöneberg 2d9ec39a2d
make sure we remove obsolete entries from translations (#3995) 2022-04-11 11:25:08 +02:00
Daniel Marjamäki 8f386e15fd Remove bug hunting. This feature will be provided in Cppcheck premium. 2022-04-11 07:31:33 +02:00
Georgi D. Sotirov 33315b0ae5
Replace tinyxml2_LIBRARY with tinyxml2_LIBRARIES (#3897) 2022-03-15 21:17:03 +01:00
Oliver Stöneberg 0d336b868c
avoid some Clang compiler warnings (#3896) 2022-03-13 20:07:58 +01:00
Oliver Stöneberg 12c1c081dc
run dmake and update Qt translation files on CMake build (#3820) 2022-02-16 07:06:59 +01:00
Oliver Stöneberg d528555002
some preparations for Qt6 support (#3777)
* findDependencies.cmake: cleaned up find_package() call for Qt

* some CMake preparations for Qt6 support

* some Qt6 compilation fixes
2022-02-07 17:35:25 +01:00
Oliver Stöneberg c918e1bc50
added building of GUI tests to CMake (#3619) 2021-12-17 21:49:32 +01:00
Oliver Stöneberg 54d621555d
scan GUI sources with clang-tidy in CI (#3233)
* build UI dependencies before running clang-tidy

* clang-tidy.yml: enabled GUI sources and build some dependencies for clang-tidy

* work around missing dependency for Qt install step
2021-10-31 20:15:32 +01:00
Oliver Stöneberg b4704ba065
use target-specific configuration instead of global ones in CMake (#3534) 2021-10-30 09:08:07 +02: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
Daniel Marjamäki c7cbe7f2d3 rename externals/tinyxml to externals/tinyxml2 2020-11-16 09:11:53 +01:00
Frank Zingsheim 686a1bec99 GUI: Add online help (CMake) 2020-07-26 00:22:28 +02:00
Oliver Stöneberg 3a90341961
some CMake cleanups and additions (#2639) 2020-05-27 05:15:46 +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
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
Susi Lehtola 3f4aae75e2 LinguistTools is not a library. (#1274) 2018-06-03 07:13:39 +02:00
Susi Lehtola f2fc38a5b4 Use modern CMake syntax. (#1273)
* Use modern CMake syntax.

* Update way of finding Qt5 components
2018-06-02 18:31:33 +02:00
Frank Zingsheim e182addcf6 CMake: Upgrade Qt4 to Qt5 (#935) 2017-08-07 23:49:47 +02:00
Chocobo1 0972de14f1 Rename icon.svg to cppcheck-gui.svg 2016-09-27 16:28:36 +08:00
Chocobo1 4e11c0004d Rename icon.png to cppcheck-gui.png 2016-09-27 16:28:36 +08:00
Chocobo1 bdc59a51dc Add .desktop file 2016-09-27 16:05:38 +08:00
Frank Zingsheim 47c063e13f Fixed #7660 (cmake build does not handle simplecpp) 2016-08-06 18:21:54 +02:00
Frank Zingsheim 70c20515a9 Cmake object linkage. Fix #7128: (cppcheck 1.70 doesn't report any warnings) 2015-11-26 20:25:09 +01:00
Luis Díaz Más 22424ba54a Add CMake files 2015-02-13 19:00:14 +01:00
Daniel Marjamäki c971fa0d4b cmake: cleanup unmaintained cmake files 2011-05-19 17:16:04 +02:00
Markus Elfring a1e6382247 Deletion of references to modules "QtHelp" and "QtXml" in the GUI CMake script
Two Qt modules are not needed any more in the CMake script for the graphical
user interface after the commit "GUI: Open online-help instead of local help".
3965a08b7b (commit)

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-04-27 20:48:58 +02:00
Markus Elfring 6cd0c2f1b3 Addition of Spanish translation in the GUI CMake script
A file name was added to the GUI CMake script for the Spanish translation.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-04-06 17:06:23 +02:00
Kimmo Varis 33f743875b GUI: Add new files to CMake build file. 2011-04-02 16:58:53 +03:00
Markus Elfring ccf1282c91 Deletion of "htmlhelp" from link setting in a CMake script (bug #2524, #1957)
The library "htmlhelp" is not needed by the graphical user interface at the moment.
2fea5f01d6 (gui)/gui.pro

There are difficulties to fulfil this dependency.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-03-28 09:03:04 +02:00
Markus Elfring db84b3d0e7 Renaming of the file for the Swedish translation in a CMake script (bug #2524)
A translation file was renamed to use the correct ISO-639 name.
03bd4fa463 (gui)/gui.pro

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-03-26 20:57:55 +01:00
Markus Elfring 87d85cd89e Renaming of the GUI executable to "cppcheck-gui" in a CMake script (bug #2524)
The executable file for the graphical user interface was renamed in a CMake
script to synchronise this setting with the qmake build specification.
b88ce77e4a (gui)/gui.pro

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-03-26 20:55:08 +01:00
Daniel Marjamaki c6b176014b cmake: removed the non-working pcre. ticket: #2679 2011-03-26 19:03:11 +01:00
Kimmo Varis aab1b996ab GUI: Remove help viewer files from CMake build. 2011-03-26 17:52:08 +02:00
Sebastien Debrard 29b7d4b9c3 sync cmake files with the master branch 2011-03-26 02:03:52 +01:00
Markus Elfring 9301ee28a8 Added CMake files 2011-03-25 07:14:53 +01:00
Daniel Marjamäki 8e58cfcd32 Removed cmake/scons files 2010-02-23 18:14:33 +01:00
Kimmo Varis 3a7961e345 Add htmlhelp lib to GUI's CMake file. 2010-02-23 18:38:51 +02:00