Commit Graph

51 Commits

Author SHA1 Message Date
Christopher Lam
89e2bef427 Merge branch 'maint' 2023-02-26 13:51:33 +08:00
Christopher Lam
89e63ef672 Bug 798754 - Build fails with gcc 13 and glib > 2.76, ter 2023-02-26 08:30:14 +08:00
Frank H. Ellenberger
fcbda57a6b Merge branch 'maint' 2023-02-24 19:19:12 +01:00
John Ralls
184669f517 Bug 798754 - Build fails with gcc 13 and glib > 2.76
GLib 2.76 introduced a no-discard warning on g_string_free
if the second parameter is FALSE. This revealed a string
leak and a correct usage that didn't use the return value.
2023-02-23 09:47:37 -08:00
Richard Cohen
bddb4468fa Import GLIB2 as a target, and use it to simplify the CMakeLists 2023-02-21 12:59:42 +00:00
John Ralls
f6919e60a7 Merge Richard Cohen's 'cleanup' into master. 2023-01-24 12:05:47 -08:00
Richard Cohen
1cec0cb3f3 Use internal extern "C" { ... } for C++
- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
2023-01-23 18:40:01 +00:00
Richard Cohen
19bbde7000 Fix some typos 2023-01-23 15:01:46 +00:00
Robert Fewell
4f8643674b Remove all references to GncDisplayItem 2022-11-05 17:04:12 +00:00
Robert Fewell
078d7875d3 Change all references to plugin_class->actionsb
Change all references to plugin_class->actionsb and n_actionsb to
plugin_class->actions and n_actions
2022-11-05 17:04:11 +00:00
Robert Fewell
0f70143c55 Initial change to plugin source files 2022-10-30 13:16:34 +00:00
John Ralls
74d0630867 Bug 798237 - Logging during XML file loading degrades performance...
significantly

Modify the DEBUG and PINFO macros to return unless qof_log_check is
true. Replace almost all direct calls to g_debug and g_message with
DEBUG and PINFO respectively.

Track the highest logging level sent to qof_log_set_level to provide a
short-circuit return in qof_log_check. Remove setting GNC_MOD_TESTS to
QOF_LOG_DEBUG so that the short-circuit threshold isn't defeated by
always being DEBUG.

Net result: 33% improvement in xml load times.
2021-09-14 15:15:11 -07:00
Christopher Lam
9ddb9e8215 [gnc-module.c] free a GList* properly
g_list_free (current) was a NOP because current became NULL after the
preceding GList traversal.
2021-08-24 22:32:39 +08:00
John Ralls
ebf84fbf8d Bug 798229 - GncDate::c_formats is being created and destroyed twice...
resulting in a double free crash on every exit.

Exclude by name the obsolete pre-GnuCash 4 modules from being inspected
so that they don't try to construct and destroy their static variables
twice.
2021-07-06 12:03:41 -07:00
Geert Janssens
e8c321d954 Drop as dependency from gnc-module 2020-10-10 12:32:58 +02:00
Geert Janssens
4c77f7670e engine - remove gncmod boilerplate
engine is now an ordinary shared library

This requires a few more places to run gnc_engine_init as
this is no longer done as part of module loading.
2019-12-06 20:38:21 +01:00
Geert Janssens
95b81844ad Update documentation referring to the deprecated gnc:module wrapper 2019-12-06 20:38:21 +01:00
Geert Janssens
5a650ad566 gnc-module - fix test build on Windows 2019-12-06 20:38:20 +01:00
Geert Janssens
63e89aecf7 gnc-module - fix incompatdep test
The test passed but for the wrong reasons:
as no GNC_MODULE_PATH was passed to the test
it just didn't find the module. That's different
from finding a module with the same name but
a wrong sysver. This commit fixes that.
2019-12-06 19:59:12 +01:00
Geert Janssens
043c6367a5 gnc-module test updates
- move test modules into a subdirectory on Windows as well
- move the futuremod module into its own subdirectory
  to avoid its load warnings each time gnc_module_init is called
  That also tends to happen when building guile modules.
- remove the log handlers filtering out the futuremodsys warnings
  They didn't match the actual warning signature anyway and
  they're no longer emitted during testing
2019-12-06 19:59:12 +01:00
Geert Janssens
8aed43ec55 gnc-module - drop redundant extra_dist specificiation
There was only the README left in this list and that was already in
the local dist list by itself
2019-12-06 19:59:12 +01:00
Geert Janssens
2c61662113 gnc-module - remove guile traces from c-interface tests and examples
None of them still depend on guile.
2019-12-06 19:59:12 +01:00
Geert Janssens
331039cdcc gnc-module - expand c-interface load test and make it guile independent 2019-12-06 19:59:12 +01:00
Geert Janssens
fbd73c83cf gnc-module - move most of scm tests to bindings/guile
This is a first rudimentary separation of gnc-module tests
based on whether they require guile or not. Needs plenty of refinement
which will be applied in followup commits.
2019-12-06 19:59:12 +01:00
Geert Janssens
6eb0ccfa11 gnc-module - move guile wrappers to bindings/guile 2019-12-06 19:59:12 +01:00
Geert Janssens
33e1ff645c Allow to pass include directories to the add_swig_xyz commands
This will be needed when the wrappers no longer live in
the same directory as the objects they are wrapping.
2019-12-06 19:59:11 +01:00
Christopher Lam
330687deb6 Merge branch 'maint' 2019-10-23 07:53:25 +08:00
John Ralls
9661a77f3c Bug 797459 - Installation (for 3.7) Readme Version number shows 2.2.x
Remove the version line and update the number of developers: The
AUTHORS file shows more than 200, not counting patches.
2019-10-15 10:55:18 -07:00
Christopher Lam
0c65c41b32 guile: remove support for guile < 2.0 2019-10-02 19:55:50 +08:00
John Ralls
b8b33b9591 Revert "More conversions from pkg-config variables to imported targets."
This reverts commit 1a9fcfefad because
on MinGW cmake complains about the paths in pkgconfig files. This can
be addressed by using the MSYS2 cmake instead of the MINGW32 one, but
that requires some other changes... and there's also a path separator
bug in that version of FindPkgConfig.cmake.
2019-09-21 15:53:25 -07:00
John Ralls
1a9fcfefad More conversions from pkg-config variables to imported targets.
Also converts ICU detection from pkgconfig to FindICU.
2019-09-13 17:05:35 -07:00
Geert Janssens
d35eabd636 Prevent autocompilation of the guile test scripts
There were several issues:
- we store the compiled test*.go files in a tests subdirectory, but this is not
  on the GUILE_LOAD_COMPILED_PATH. Added this directory to the path.
- guile was looking for 'script.scm.go' while we create 'script.go'. This is due
  to how we invoke the scripts: guile -l path-to-script.scm -c (something)
  we can replace this with -l path-to-script (without extension) as -l won't add
  the extension. So I've rewrittin the test command to invoke (load-from-path).
- the test modules foo.scm, bar.scm and baz.scm should go in tests/gnucash
  as they are defined as modules (gnucash foo), (gnucash bar) and (gnucash baz)
  respectively.
- find html.scm/go on the load path instead of using a relative path.
2019-05-25 10:09:12 +02:00
John Ralls
cac307602f Build or link all Scheme test files into a directory "tests".
Instead of random locations only occasionally related to the
corresponding source.

Includes renaming libgnucash/engine/test/test-extras.scm and
gnucash/report/report-system/test/test-extras.scm to avoid a
naming conflict.
2019-05-25 10:09:07 +02:00
John Ralls
141e777893 Suppress installing Scheme test programs. 2019-05-25 10:07:42 +02:00
Geert Janssens
a9f35ed7ae Lowercase cmake commands
A huge bikeshed fest but it distracted me enough to do it anyway.
2018-05-03 23:18:15 +02:00
John Ralls
9865934410 Reduce warning about failing to dlopen a module to debug.
There's another warning for runtime about not being able to load
a specified module and this one creates a lot of noise during a parallel
build.
2018-02-19 12:27:59 -08:00
John Ralls
605f3466cb Rename the gnc-module test libraries to be consistent with other modules. 2018-02-18 16:07:25 -08:00
Geert Janssens
49a936c1fd Rewrite gnc_add_swig_guile_command to work in dist tarball as well
When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
2018-01-29 19:46:44 +01:00
Rob Gowin
54ac7f23e0 Remove Autotools 2018-01-13 12:52:57 -06:00
Geert Janssens
3d910ad2b1 Drop guile 1.8 support
And with it all quirks we still had in the code to support that version.
2017-12-20 14:55:40 +01:00
Rob Gowin
778b86e29e Handle cases where LIBDIR is not "lib"
For example, Fedora installs to lib64, Debian to lib/<arch-tuple>
2017-12-01 17:00:39 -06:00
John Ralls
5ca129d82d Remove unset variable SWIG_ARGS from Makefile.am 2017-11-30 13:31:23 -08:00
John Ralls
5204100d53 Use GNUInstallDirs in CMake Builds
Provides correct file layout when building distribution tarballs.
Fixes Bugs 790840 and 790841.
2017-11-28 14:25:35 -08:00
John Ralls
6c01e54042 Convert shell-executed scheme tests to run directly from Guile.
I.e., remove the shell invocation and with it the need to set the shebang.

Surprisingly this required some build-system modifications particularly
for cmake in order to correctly set the environment.
2017-11-07 15:04:16 -08:00
John Ralls
f412795ef2 Remove extraneous parameters from GNC_ADD_SCHEME_TARGETS 2017-11-07 15:04:16 -08:00
Geert Janssens
1238b9d8cd Prevent gcc from searching config.h in the current directory
This will avoid a ninja-build from picking up a config.h generated by the autotools build
(in the root build directory). Picking up the wrong config.h may lead to all kinds of
subtle issues if the autotools run was done with different options than the cmake run.
2017-10-26 14:05:17 +02:00
Geert Janssens
f943ba61ae Rename directory for code from external projects
'lib' is also being used by the cmake build, so there was a
theoretical risk for file conflicts. The new name is 'borrowed'.
2017-08-17 15:25:49 +02:00
Geert Janssens
53afd36de1 Keep the test modules from gnc-module outside of the normal GNC_MODULE_PATH
They interfere with other tests and pollute the build logs in cmake.
2017-08-16 11:59:27 +02:00
Geert Janssens
3e3eead3c5 Eliminate plugins directory
bi-import and customer-import have been put with the other importers
example is moved to gnc-module as, well, an example
2017-08-14 18:17:13 +02:00
Geert Janssens
0c6da2f001 Cleanup some more obscure references to no longer existing 'src' directory 2017-08-11 22:44:50 +02:00