Commit Graph

30 Commits

Author SHA1 Message Date
Oliver Stöneberg a15a227b73
bumped minimum supported GCC version to 4.8 (#3768) 2022-02-05 17:57:32 +01:00
Paul Fultz II 1f5c3670bd
Use a unique variable name when checking if a flag is valid (#3532) 2021-10-30 09:07:06 +02:00
Oliver Stöneberg cc1a18806c
use -Weverything for clang in CMake / fixed some warnings (#3519) 2021-10-24 11:06:48 +02:00
Paul Fultz II 59a1c1a9d8
Refactor: Remove variable analyzer (#3339) 2021-07-18 07:46:31 +02:00
chrchr-github 8cd8b9c64e
Fix MSVC build and some warnings (#3334) 2021-07-16 21:55:12 +02:00
Oliver Stöneberg dcc90c6dfa
improved compiler warnings about missing attributes (#3232) 2021-04-25 12:52:09 +02:00
Oliver Stöneberg 491f4874c5
fixed/aligned some compiler warnings (#3065) 2021-01-21 18:13:32 +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 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
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
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 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
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
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
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
Daniel Marjamäki 1048aa8ead Disable Wshadow warnings
[ci skip]
2018-11-23 22:34:21 +01:00
Paul Fultz II e839001f3d Fix warnings (#1478) 2018-11-14 06:14:04 +01: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
Ayaz Salikhov 64e61d28ba Add an ability to use address sanitizer (#979) 2017-10-21 21:04:14 +02:00
Frank Zingsheim 2b2a1e7ab2 Fixed #7749 (CMake gcc version >= 4.6 see https://github.com/danmar/cppcheck#compiling) 2016-10-29 12:55:50 +02:00
Frank Zingsheim e5a3ba7cac Switch off -D_GLIBCXX_DEBUG for Clang on Linux
(see 73b088a6dd for Makefile)
2015-11-26 21:13:04 +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