Commit Graph

50 Commits

Author SHA1 Message Date
Oliver Stöneberg 93a53af168
modernized and cleaned up CMake files / explicitly check for CMake 3.13 with Visual Studio (#5825) 2024-01-05 11:07:16 +01:00
Oliver Stöneberg 615e4c01c4
bumped minimum requirements to GCC 5.1 / Clang 3.5 / Visual Studio 2015 / CMake 3.5 (#5398)
The current versions only have partial C++11 support which fortunately
has caused us only few issues so far but it would be good to finally
have fully working C++11 support. This also gets rid of several CI
builds on very outdated platforms.

The outdated platforms were used to also test CMake 2.8 but as future
versions of CMake will drop combability with CMake < 3.5 this is a good
time to also drop that requirement on our part.

This PR does not remove or update any outdated code.
2024-01-04 21:31:08 +01:00
Daniel Marjamäki 2932ab7592
Revert "Fixed #12071 (suppressing critical error, no indication to user that analysis of file fails) (#5771)" (#5775)
This reverts commit 7c316fb76d.
2023-12-17 19:13:14 +01:00
Daniel Marjamäki 7c316fb76d
Fixed #12071 (suppressing critical error, no indication to user that analysis of file fails) (#5771) 2023-12-17 15:42:17 +01:00
Oliver Stöneberg 84f2485a26
fixed #7099 - added optional `man` target to CMake / build manpage in CI (#5536) 2023-10-09 22:20:36 +02:00
Oliver Stöneberg cb915085ea
use C++17 when building with Visual Studio in CMake - fixes GUI CI builds (#4924)
* use C++17 when building with Visual Studio in CMake

* printInfo.cmake: print more variables

* CMakeLists.txt: set C++ standard earlier
2023-03-31 10:37:53 +02:00
Oliver Stöneberg 36192c50f6
removed unnecessary OSS-Fuzz related builds from CI (#4827) 2023-02-25 15:40:12 +01:00
Oliver Stöneberg e5572835c0
fixed `platforms` lookup / set proper platform type for `unix32-unsigned` and `unix64-unsigned` / copy `platforms` in CMake (#4464) 2023-01-26 22:05:40 +01:00
Oliver Stöneberg fd9d05300e
handle precompiled headers with `ccache` / fixed caching in some docker builds (#4505)
* CI-unixish.yml: handle precompiled headers with `ccache`

* actually support `ccache` in CMake < 3.17

* CI-unixish-docker.yml: split CMake build and test execution into separate steps

* findDependencies.cmake: only print message about macthcompiler being disabled when it is actually used

* CI-unixish-docker.yml: added missing `ccache` CMake options
2022-09-26 18:21:43 +02:00
orbitcowboy 00251024c4 Cleanup some cmakelint warnings in CMakeLists.txt 2022-08-28 00:21:10 +02:00
Oliver Stöneberg 271213cbbd
added make target `validatePlatforms` to CMake (#4343)
* added missing `platforms/cppcheck-platforms.rng` validation

* added make target `validatePlatforms` to CMake
2022-08-06 19:56:32 +02:00
Oliver Stöneberg 9e8d5d1b2e
avoid unnecessary `validateCFG-*` targets in CMake (#4166) 2022-06-03 23:07:28 +02:00
Oliver Stöneberg 36ef4dc5b8
added support for Qt6 (#3930) 2022-04-15 18:49:24 +02:00
Oliver Stöneberg 0e1a0b97ed
added make targets `checkCWEEntries`, `validateXML` and `validateRules` to CMake (#4010) 2022-04-13 20:56:07 +02: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 a15a227b73
bumped minimum supported GCC version to 4.8 (#3768) 2022-02-05 17:57:32 +01:00
Paul Fultz II 2a3657154b
Dont require __main__ for an addon (#3363) 2021-08-12 20:17:51 +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
Oliver Stöneberg 488813d00f
added validateCFG and checkcfg targets to CMake / some refactorings (#2687) 2020-11-02 20:16:15 +01:00
Oliver Stöneberg e066300f95
added dmake targets to CMake (#2634) 2020-05-10 16:41:50 +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 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 28cd5d7ea2
fixed OSS-Fuzz builds and added CMake targets (#2577)
* fixed compilation of OSS-Fuzz clients

* added preliminary CMake target for fuzz-client - also added *_sanitized targets of dependencies (only available with Clang)

* added oss-fuzz build to Travis CI
2020-03-31 09:33:58 +02:00
Daniel Marjamäki a17f2a6f05 Compiling/Installing : The CFGDIR parameter was removed. Use FILESDIR instead. 2019-08-17 10:53:07 +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
Paul Fultz II 12f4353d40 Add build scripts for triage tool (#1862) 2019-06-01 10:48:39 +02:00
Oliver Stöneberg 373039f034 Minor Cleanups (#1321)
* added CLion project folder to .gitignore

* adjusted project name in CMakeLists.txt

* avoid warning when compiling "Debug" with Visual Studio via CMake

There was a GCC-style compiler flag in the common flags in compileroptions.cmake which caused the following warning:
cl : Command line warning D9002 : ignoring unknown option '-O0'

* compileroptions.cmake: restored original formatting
2018-07-23 08:34:41 +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
Frank Zingsheim 47c063e13f Fixed #7660 (cmake build does not handle simplecpp) 2016-08-06 18:21:54 +02:00
Frank Zingsheim 1d7fac3ca9 Added testrunner test to cmake. #7098 2015-11-26 21:01:07 +01: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
Daniel Marjamäki 88176051fe cmake: reduced message a little 2011-04-02 14:29:27 +02:00
Markus Elfring 8cde24597f Determination of rule support in CMake scripts (bug #2679, #2524)
The support for check rules will be automatically included in the generated
software if build settings were accordingly selected for PCRE.
https://sourceforge.net/apps/trac/cppcheck/ticket/2679

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-04-02 13:25:18 +02:00
Daniel Marjamäki 913342d08f Fixed #2677 (XmlTo is now required for building?) 2011-03-26 09:27:44 +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 116772da7e Make workaround fix for ticket #1299.
Since lib does not work when built as an static library, compile lib
code as part of cli/gui code.
2010-01-31 12:36:56 +02:00
Kimmo Varis 40951e1618 CMake - Build GUI also in Cygwin if QT4 is found. 2010-01-26 00:19:02 +02:00
Kimmo Varis 0010a98316 CMake - build Docbook manual in Linux.
Add XMLTO macro to build Docbook manual using xmlto program. xmlto
is not available in Windows so limit building to Linux.

Adds new target "html" to build which is not run automatically.
2010-01-06 12:54:27 +02:00
Kimmo Varis 4c2a77db9b CMake - Include test project when creating VS IDE project. 2010-01-05 22:11:48 +02:00
Kimmo Varis eb8c6aec55 CMake - add 'make check' -target.
Tests are now excluded from normal targets to make compiling
faster. 'make check' -target will compile and run tests.
2009-12-20 11:16:56 +02:00
Kimmo Varis 59ea59b5be CMake - disable building GUI for Cygwin. 2009-12-19 17:15:17 +02:00
Kimmo Varis 3437242ea7 CMake GUI build - fix adding resources to GUI. 2009-12-15 22:27:18 +02:00
Kimmo Varis e010575398 Build GUI using CMake.
This is a start for building GUI with CMake. It works but it is a bit ugly.
2009-12-15 22:27:18 +02:00
Kimmo Varis 6e540e615d Add testsuite to CMake build files. 2009-12-15 22:27:17 +02:00
Kimmo Varis c85c0fbabc Add simple CMake build files to build lib and cli.
Apparently not everybody wants to use QMake to build cppcheck. Which is
understandable if you only want to hack on/build lib and cli. Qt and QMake are
pretty lot to install for just that.

So lets start using CMake. It is widely used and is "just" build system and not
programming framework. CMake is also easy to use for building Qt software too
so it can replace QMake.

This first commit only builds lib and cli for Linux.
2009-12-15 22:27:17 +02:00