* 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.
`MATCHES` does regular expression matching which is not the intended behavior here. `Clang` still requires it since it also needs to match `AppleClang.
* 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
* 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
* 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
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.
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.
* 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
* 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