Commit Graph

136 Commits

Author SHA1 Message Date
akallabeth
fbd3a2bef2 [rdtk,warnings] fix -Wunused-parameter 2025-02-13 15:54:18 +01:00
akallabeth
a24ffe957c [cmake] make C and C++ standards configurable
use cache variables to allow overriding them from command line
2025-02-13 13:30:06 +01:00
akallabeth
0ae7c4b52d [cmake] refactor configuration
* Split common stuff to reusable files
* Disable INTERPROCEDURAL_OPTIMIZATION for SDL2/3 resource targets
2025-02-11 11:33:34 +01:00
akallabeth
f901357a3d [rdtk] fix integer casts 2024-12-19 11:36:10 +01:00
akallabeth
cf4ff90e16 [rdtk] fix rdtk_font_load_descriptor
* ensure string is '\0' terminated
* ensure allocated string is freed in all paths
2024-12-16 14:01:44 +01:00
akallabeth
43bfc74721 [cmake] install only header files
skip empty directories on install
2024-12-15 17:54:54 +01:00
akallabeth
cfeec0857d [rdtk] fix font parser
ensure '\0' termination of input string.
2024-12-15 16:54:24 +01:00
akallabeth
180a9d7d72 [cmake,flags] print all configuration flags
Since we do not know wich configuration will be build with
multiconfiguration generators print out all C_FLAGS_XXX and
CXX_FLAGS_XXX variables
2024-12-05 09:36:26 +01:00
akallabeth
ba8fd2ada5 [cmake] force configuration options
limit multiconfiguration options to supported types
2024-12-05 09:36:23 +01:00
akallabeth
faae38120c [cmake,format] reformat all cmake files 2024-11-27 20:41:48 +01:00
stephanebill
4f2afa8c47 spell check with codespell 2024-11-20 16:53:40 -05:00
Armin Novak
527db6783b [cmake] split tests
* Keep BUILD_TESTING, but only run tests compatible with API (for
  packaging)
* Add BUILD_TESTING_INTERNAL for all tests including internal function
  tests that modify API to be run on our CI
2024-10-24 09:45:44 +02:00
akallabeth
efeac25fa9 [warnings] fix integer narrowing 2024-10-03 21:21:38 +02:00
akallabeth
6c8c67b385 Merge pull request #10677 from akallabeth/int-narrow
Int narrow
2024-10-03 21:17:56 +02:00
akallabeth
2c7ca7f4b2 [rdtk] fix integer narrow 2024-10-03 18:59:08 +02:00
akallabeth
cfc37caeb8 [cmake] cleaning_configure_file
add a wrapper to automatically add generated files to clean target
2024-10-02 23:28:08 +02:00
akallabeth
586f40631f [warnings] fix shorten-64-to-32 2024-09-17 16:13:48 +02:00
akallabeth
8a3f2be769 [rdtk] improve rdtk_font_load_descriptor_file
do simpler and better error handling
2024-09-15 09:07:38 +02:00
akallabeth
734d4ce43e [rdtk] fix integer cast warnings 2024-09-03 12:56:21 +02:00
akallabeth
92e416610a [warnings] fix clang-tidy issues in rdtk 2024-08-29 15:20:47 +02:00
akallabeth
15456e1ee1 [warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
akallabeth
1d33095500 [warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
Armin Novak
d71af44bb1 [warnings] disable warnings for generated code
* Disable clang-tidy in test build directories
* Disable compiler warnings for test binary directories.

These contain generated code we can not change, so the warnings are just noise
2024-08-28 09:18:30 +02:00
akallabeth
56d660f258 [cmake] mark dependency includes SYSTEM
Mark all dependency include paths SYSTEM so warnings from system headers
are excluded from ci warning statistics
2024-08-26 11:10:49 +02:00
akallabeth
711dbb53ab fix #10447 2024-08-08 08:45:43 +02:00
akallabeth
55aa202ff5 [coverity] 1543037 Out-of-bounds read 2024-04-11 12:04:07 +02:00
akallabeth
678ff144ab [cmake] unify windows resource file generation
* use a macro to add resource files for executables and shared libraries
* use that macro to declare targets
* use that macro to set library/binary versioning
* use that macro to set target output name
* use a macro to create manpages and names
2024-03-20 11:17:18 +01:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
akallabeth
f6a208f75e [cmake] generate relative pkgconfig path
generate the relative pkgconfig path from the actual install locations.
fixes #9718
2024-01-05 14:19:34 +01:00
Armin Novak
a7decba8c2 [cmake] unify common options 2023-12-22 16:21:30 +01:00
Armin Novak
175a3ca09a [cmake] do not append EXECUTABLE_SUFFIX to OUTPUT_NAME 2023-12-22 15:37:56 +01:00
Armin Novak
b04271ae2d [cmake] add executable versioning
optionally append API version to generated binaries
2023-12-21 18:56:51 +01:00
Armin Novak
93148ea35f [cmake] add RDTK_FORCE_STATIC_BUILD
since rdtk is only used by shadow server add an option to directly link
it with -DRDTK_FORCE_STATIC_BUILD=ON without installing any header or
library
2023-12-21 18:56:51 +01:00
Armin Novak
e8f5f90603 [cmake] add RDTK_FORCE_STATIC_BUILD
since rdtk is only used by shadow server add an option to directly link
it with -DRDTK_FORCE_STATIC_BUILD=ON without installing any header or
library
2023-12-21 17:29:39 +01:00
akallabeth
615fcc4370 [cmake] prevent in source builds 2023-11-28 12:14:55 +01:00
akallabeth
1b31852d32 [git] remove .gitignore
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
Armin Novak
60390ea40c [pragma] unify compiler diagnostics 2023-10-16 15:10:13 +02:00
akallabeth
89429885a0 [cmake] make generated pkg-config files relocatable
* new CMake option PKG_CONFIG_RELOCATABLE (default ON) allows generating
  traditional or relocatable pc files
2023-10-10 19:35:27 +02:00
akallabeth
7a71441476 [warnings] fix integer multiplications
Ensure the integer width for size arguments is 64bit in a
multiplication. Leading 64bit constant 1ull expands width, a trailing
one is ignored.
2023-08-22 11:55:00 +02:00
Kimon Hoffmann
8ec4d20616 [cmake] Locate PkgConfig module with find_package() instead of include(FindPkgConfig)
This is the contemporary way of including find modules and including the
find module this way avoids cmake errors in conjunction with
find_package_handle_standard_args().

Signed-off-by: Kimon Hoffmann <Kimon.Hoffmann@lawo.com>
2023-08-21 12:43:56 +02:00
akallabeth
41bd8bd3fb [various] fix integer conversions 2023-08-04 15:07:56 +02:00
akallabeth
793d80f2c4 [cmake] update ci defaults 2023-08-04 12:59:11 +02:00
akallabeth
8470b6ea26 [cmake] set default build type
set with CACHE STRING FORCE to properly be picked up by configuration
tools
2023-08-04 12:59:11 +02:00
akallabeth
76d23885d4 [cmake] add common options to subprojects 2023-08-04 12:59:11 +02:00
Kai Pastor
5ecc011c13 Export interface include directories 2023-08-01 11:12:46 +02:00
Armin Novak
007ca8b646 [rdtk] code cleanups 2023-08-01 08:37:58 +02:00
Armin Novak
0983288224 [rdtk] fix nine_patch
refactor code to make it easier to read and avoid out of bound reads
2023-07-31 20:18:48 +02:00
Armin Novak
1f77d0b356 [rdtk] assert arguments 2023-07-31 20:18:48 +02:00