Commit Graph

41 Commits

Author SHA1 Message Date
Christopher Lam
bbcffa3eca Remove deprecated scheme modules 2021-01-30 00:42:20 +08:00
Geert Janssens
e78313147c Cmake - rework gnc_add_scheme_deprecated_module to use keyword parameters
Update all invocations accordingly
2020-03-30 08:41:29 +02:00
Geert Janssens
06ff8a292d Use new keyword parameters for all calls to gnc_add_scheme_test_targets 2020-03-30 08:41:29 +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
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
Geert Janssens
0eb0b922d7 Python - remove 2.x only code paths 2019-10-02 12:35:25 +02: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
76979554a0 Ubuntu 18.04 requires explicit link to pthreads. 2019-09-14 11:49:12 -07:00
Christian Gruber
b303fc6d99 Use target gtest instead of GTEST_LIB and GTEST_INCLUDE_DIR
This simplifies usage of GoogleTest, since independent handling of
GTEST_LIB and GTEST_INCLUDE_DIR is not necessary anymore.

Additionally CMake creates a dependency now between target gtest and all
test applications using it. This improves build process when building
GoogleTest from source code. When any test application is built,
GoogleTest library is automatically rebuilt if necessary now for
instance.
2019-09-03 23:45:09 +02:00
Christian Gruber
7e71a9724f Change search strategy for prebuilt GoogleTest/GoogleMock libraries
Prebuilt GoogleTest/GoogleMock libraries are now only searched, if
GoogleTest source code wasn't found.
2019-09-03 23:45:06 +02:00
Geert Janssens
0e93e95c6c Merge maint 2019-08-17 12:53:55 +02:00
Christian Gruber
1b4e481296 Add gtest_main.cc to libgtest.a
Currently when compiling GoogleTest from source code, source file
gtest_main.cc from GoogleTest repository is not compiled into any
library as in GoogleTest repository, where it is compiled into
libgtest_main.a. Instead gtest_main.cc is added to source file list
GTEST_SRC, which is then added to the list of source files of every
single GoogleTest based test application.

To simplify this gtest_main.cc is added to the source file list of
target gtest now. Additionally GTEST_SRC is merged into
lib_gtest_SOURCES, since both variables defined source files for
GoogleTest libraries.

Now target gtest generates library libgtest.a, which already contains
the main function from source file gtest_main.cc. This is different to
GoogleTest build system, where both are separated into two independent
libraries libgtest.a and libgtest_main.a.
2019-08-15 23:20:45 +02:00
Geert Janssens
06fae12265 RptCleanup - Add compat interface for all module interfaces that were deprecated so far
These can be permanently removed for the gnucash 5.x series. A comment has been added to that effect.
2019-06-18 15:18:46 +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
John Ralls
827c43d935 Add jenny to the dist and compile it. 2018-07-23 12:47:25 -07:00
Geert Janssens
1f3cf845c4 Work around a conflict between gcc 8.0 and swig 3.0
The swig 3.0 generated python wrappers trigger a warning converted into an error issued
by gcc 8.0 for using strncpy as follows:
strncpy(buff, "swig_ptr: ", 10);
The reason is this call will truncate the trailing null byte from the string.
This appears to have been fixed in swig master already but that's not released yet
so let disable the warning when compiling the swig wrappers until it is.
2018-05-09 22:18:29 +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
Bill Nottingham
0a3f2dd3ef Allow building against a shared libgmock (an option in gtest-1.8.0). 2018-04-03 21:59:50 -04:00
John Ralls
f4965ae2ac Move direct check dependencies to the originating CMakeLists.txt.
Removing transitive dependencies from being declared direct.
2018-02-18 22:16:27 -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
Geert Janssens
36cb167b68 Rewrite gnc_add_swig_python_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
Geert Janssens
4317d8a8f6 Improve handling of generated distributable files
- the two dist_add_... macros now both take a list of file names
as argument so more files can be added at once to the dist tarball.
- dist_add_generated now creates the right target by itself. There's
  no need to pass one any more
- make the swig generated *.py module files explicit output files
- change a couple of custom_targets into custom_commands. The only
  reason they were defined as targets was to ensure they got built
  before the dist tarball. This is now properly handled by the
  dist_add_... macros.
- correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS
  was not the way to do it according to that property's help page)
2018-01-29 19:46:44 +01:00
Geert Janssens
3dff4e5211 Fix make dist on a clean checkout
cmake with unix makefiles fails to resolve dist dependencies
added from COPY_FROM_BUILD if these dependencies aren't built yet.

This commit replaces the COPY_FROM_BUILD based logic with two new functions
'dist_add_configured' and 'dist_add_generated' to indicate which files should
be included in the dist tarball. The latter also adds a target level dependency
to the dist tarball custom command. Hence the former should
be used for files that get generated during a cmake run while the latter
should be used for files generated as the result of a 'make/ninja-build' run
(like files for which an add_custom_command rule exists).

Note: this commit also temporarily disables the dist target when building
from a tarball (and hence it won't be tested in distcheck either). This
will be handled in a future commit.
2018-01-29 19:46:44 +01:00
Rob Gowin
54ac7f23e0 Remove Autotools 2018-01-13 12:52:57 -06:00
John Ralls
44fc5b0555 Fix CXX Flags for g++. 2017-12-26 18:23:09 -08:00
John Ralls
91727525b9 Enforce -Werror on C++ files and fix resulting errors. 2017-12-26 15:18:43 -08:00
lmat
34e0d6cfa0 kvp frame to template and correcting failure macro
The template avoids the need to cast to and from void*, and adds flexibility to
the targeted function's signature.

test-stuff.h defines a macro, "failure" which is used as an identifier
in the standard IO library, so I moved any inclusion of test-stuff.h to
the last include position so that "failure" wouldn't be defined before
the IO library was included.
2017-12-21 07:39:32 -05:00
lmat
eb6c741bf9 Account.c to Account.cpp
Since Account.c is now Account.cpp, the function signatures look a bit
different internally. The tests rely on function signatures in error
messages. Instead of trying to figure out what the exact
function signature might be, I use a substring matching strategy to
ensure that the correct error was issued.
2017-12-21 07:39:32 -05: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
John Ralls
84929c8e5b One more stray header in libexec. 2017-12-02 10:34:07 -08:00
John Ralls
5ca129d82d Remove unset variable SWIG_ARGS from Makefile.am 2017-11-30 13:31:23 -08:00
Guy Taylor
c9c5876431 Use glib.h over custom typedefs in Python SWIG
Use the native glib.h (mainly gint, gfloat ...) over custom typedefs in
SWIG type files. This is for Python only.
2017-11-28 16:27:50 -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
e92a1b3723 Fix python tests in tarball builds. 2017-11-28 14:25:24 -08:00
John Ralls
831640b546 Remove common/test-core/unittest_support.py from git.
It's a SWIG-generated file accidentally added during directory
rearrangement.
2017-11-28 09:53:06 -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
Mike Alexander
f5c864532f Add a couple of directories containing dependencies of libtest-core-guile.
Without this the  build fails the dependencies are loaded from the
installed version or the build fails if GnuCash is not installed..
2017-08-21 23:47:19 -04:00
John Ralls
639d52f916 Fix typo, broke build on Mac. 2017-08-19 17:15:49 +02:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00