Commit Graph

205 Commits

Author SHA1 Message Date
John Ralls
518519654c Merge Bill Nottingham's 'gmock-trial' into unstable. 2018-04-14 15:52:26 -07:00
Henrik tom Wörden
a909f802de FIX: Corrected typos 2018-04-07 12:20:58 +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
Julian Wollrath
a43b115a45 Bug 791831 - Add python3 support
This switches swig to use python 3 specific features when generating the
bindings, switches the build over to python 3 and makes the neccesary
python 2 to 3 conversions in the bindings and tests.
2018-03-17 15:10:00 -07:00
John Ralls
8c9855a6bb Pass GTEST_ROOT and GMOCK_ROOT through to distcheck.
So that they don't have to be exported in the environment if they're needed.
2018-03-11 10:38:05 -07:00
Geert Janssens
e7ec3a610d Drop no longer used intltool related variable 2018-02-27 23:00:30 +01:00
Geert Janssens
ba799feb2a Drop intltool in favour or using modern gettext
This requires at least gettext 0.19.6, and will break our ubuntu 14.04LTS test instance on Travis.
The next commit will work around this.
2018-02-27 22:30:06 +01: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
0d4f6e054d Improve gnc_data_home verification and creation
- Don't attempt to create a subdirectory of a non-existing home directory (use tmpdir as base directory in that case)
- Make sure all tests run in an environment with GNC_BUILDDIR and GNC_UNINSTALLED set. Otherwise
  the one-shot old .gnucash to new GNC_DATA_HOME migration may already have run at build time,
  preventing us from informing the user a run time.
- Re-enable the userdata-dir with invalid home test (linux only).
2018-02-02 10:24:04 +01:00
Geert Janssens
ff24970f5f Add GENERATE_SWIG_WRAPPERS option to control the generation of swig wrappers independently of whether we're building from git
The swig wrappers don't really depend on git (but rather on swig) and there can be
situations the builder wants to generate the wrappers also from a tar ball.
2018-01-31 16:16:59 +01:00
Geert Janssens
f319a8e2a4 Re-enable building a dist tarball from within distcheck 2018-01-29 19:46:44 +01: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
Geert Janssens
00396db560 Remove the .in extension from test-real-data.sh and stop configuring it for autotools
We have dropped support for autotools and cmake invokes this script using /bin/bash <script>
So the exact shebang value is not relevant any more
2018-01-26 18:26:06 +01:00
Geert Janssens
85bfbd8e82 Some minor cleanups after the autotools removal
This includes removal of the now unused make-gnucash-potfiles.in,
checking for CMakeLists.txt rather than Makefile.am in gnc-vcs-info,
upating the HACKING file,
and generally updating references to autotools.

I have kept "Makefile.*" exclude patterns in our CMakeLists.txt files
because they may still be lingering in the source directory from
previous autogen.sh runs. At some point these should probably be
removed as well still, together with the gitignore references to them.
2018-01-26 18:22:48 +01:00
John Ralls
74ddb671e4 Merge Chris Lam's and Aaron Laws's branch 'time64-ftw' into unstable. 2018-01-20 12:40:32 -08:00
John Ralls
d86b65183d Remove Timespec from the guile base typemap. 2018-01-20 12:35:04 -08:00
Rob Gowin
54ac7f23e0 Remove Autotools 2018-01-13 12:52:57 -06:00
lmat
7d51089501 Changing scheme conversion to gdate to use time64 2018-01-08 13:01:29 +11: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
John Ralls
a6a46d7cdc Test struct tm* returns from gnc_gmtime and gnc_localtime
To ensure that we don't crash for dereffing a nullptr.
2017-12-26 15:10:05 -08:00
Geert Janssens
2f96b19c77 Merge branch 'fix_bayes' of https://github.com/limitedAtonement/gnucash into unstable 2017-12-23 15:10:48 +01:00
Geert Janssens
f11eab36d9 Replace GNC_CONFIGURE(2) with configure_file 2017-12-23 14:07:25 +01: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
Geert Janssens
a784dd5784 Add support for guile 2.2 2017-12-20 14:55:40 +01:00
John Ralls
0026b10851 Merge branch 'maint' into unstable 2017-12-17 13:00:00 -08:00
John Ralls
84929c8e5b One more stray header in libexec. 2017-12-02 10:34:07 -08:00
John Ralls
e319a16747 Remove gnucash/test.
The only purpose of which was to test overrides/gnucash-env.
2017-12-01 20:10:55 -08:00
John Ralls
fcb4bdac9e Some fixes to complete removing gnucash/overrides. 2017-12-01 19:46:09 -08: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
Guy Taylor
744cdac5a4 Use builtin SWIG conversions for glib types
Where possible in the Python SWIG code use the builtin SWIG conversion
code over custom code. This ensures appropriate overflow/type checking.
With this I have enabled GncNumeric from longs and tested for correct
overflow handling.

Note: This could be extended to GUILE but I am not familiar enought to
safely enable this.
2017-11-28 17:08:43 -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
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
John Ralls
cbd8764780 Ensure that report unit tests dependencies are built with target. 2017-10-31 10:59:12 -07:00
John Ralls
49c70795c3 Remove X11 error handler
And with it the only direct X11 dependency.
2017-10-31 08:53:20 -07:00
Geert Janssens
1a8cf021d2 Add GNUCASH_BUILD_ID cmake/configure variable which allows packagers to define their own
For example distros may want to set the version of their package source (rpm, dpkg,...) rather than
our git id.
2017-10-26 22:48:50 +02: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
67d011b86f Add gnucash.1 man page as proper dependency for dist
This file is now generated using CONFIGURE_FILE, so cmake will pick it
up as a generated file and do proper dependency resolution based on it.
2017-10-26 14:05:17 +02:00
Geert Janssens
b83be1b8c6 Remove configure option --enable-locale-specific-tax and make gnucash always behave as if it was set 2017-10-20 20:50:33 +02:00
Geert Janssens
b3b4b20e4b Merge branch 'maint' into unstable
Resolved conflicts:
	CMakeLists.txt
	NEWS
	configure.ac
2017-09-27 17:35:13 +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
2a7f2f891a Eliminate the separate bin directory
Instead its content is moved to gnucash directly, making the gnucash directory
more meaningful.
2017-08-13 12:39:45 +02:00
Geert Janssens
4ce7be0497 Drop packaging directory
While I myself asked for it to be retained a couple of years back
I now believe it really makes no sense to keep on carrying
a completely outdated rpm spec file around. This should not
be part of the source and properly up to date and maintained
rpm spec files can be found in each rpm based distro that ships
gnucash.
2017-08-12 10:13:43 +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