Commit Graph

38 Commits

Author SHA1 Message Date
John Ralls
93323cc1dc Fix Win32 build, broken by COMMAND_EXPAND_LISTS
Create a win32 analog to make_unix_path_list that escapes the
semicolons to prevent cmake turning them into list delimiters.
2023-12-11 11:49:59 -08:00
John Ralls
a3f14759ab Asan: Make leak and ODR violation reporting CMake options.
pass -DLEAKS=ON or -DODR=ON to enable these features. They have an
effect only with CMAKE_BUILD_TYPE=Asan and don't work on Apple because
Apple clang doesn't enable them.
2023-11-25 11:17:14 -08:00
John Ralls
2234fa433e Add Asan build type that enables the Address and UB sanitizers.
Uses generator statements instead of CMAKE_<TYPE>_FLAGS_ASAN to support multiconfig generators like Xcode.
2023-11-02 12:58:46 -07:00
luz paz
8adedc2248 Fix various typos
Found via `codespell -q 3 -S *.po,./po,*.min.js,./ChangeLog*,./NEWS,./borrowed,./doc/README*,./AUTHORS,./libgnucash/tax/us/txf-de*,./data/accounts -L ans,ba,cas,dragable,gae,iff,iif,mut,nd,numer,parm,parms,startd,stoll`
2022-04-08 14:12:50 -04:00
John Ralls
76a4389a92 Bomb out immediately if or aren't set
Instead of spewing dozens of errors about file(TO_CMAKE_PATH) needing 3 parameters.
2021-03-25 13:53:58 -07:00
John Ralls
d86b30b628 Force scheme to make links before any builds.
The new modules regime can only find files in the final modules
layout, so interdependent files can be built only if they're linked
first or have a strict dependency order provided to cmake. In many
cases the latter is impractical.
2020-12-13 16:45:18 -08:00
John Ralls
401299cdd3 Fix adding Scheme tests to check target.
TEST isn't a variable name, SCHEME_TGT_TESTS is.
2020-09-26 13:11:12 -07:00
Christopher Lam
14ea5d9751 Merge branch 'maint' 2020-05-04 23:31:21 +08:00
John Ralls
1e59819176 Respect the environment LD_LIBRARY_PATH for loading Scheme modules and tests. 2020-04-29 17:11:52 -07: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
ba15cf7f7f Combine the two scheme target generation functions
Add another keyword TEST to set when test targets are to be created
2020-03-30 08:41:29 +02:00
Geert Janssens
25e08f88a5 Document the two primary functions for adding scheme targets 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
c05281c582 Use new keyword parameters for all calls to gnc_add_scheme_targets 2020-03-30 08:41:29 +02:00
Geert Janssens
91ecdcb5dd Rework SchemeTargets module to use keyword parameters 2020-03-30 08:41:29 +02:00
Geert Janssens
ba7362d895 CMake - Drop oldstyle endfunction invocations
The form without repeating the function name is preferred
2020-03-30 08:41:29 +02:00
Geert Janssens
301db9020d Merge branch 'maint' 2020-02-06 16:50:08 +01:00
Geert Janssens
90e95ba8ef CMake - remove parameter repetition in else() and endif() statements - part 2
This follows Professional CMake's recommended practises
I missed plenty of these in my first commit. This one should fix
these remaining occurrences.
2020-02-06 16:16:36 +01:00
Geert Janssens
797654133b Use newer cmake version checks 2019-09-17 15:46:50 +02:00
John Ralls
e38cc91452 Merge branch 'maint'
Bumping the required cmake to 3.10 and removing GncPkgConfig.cmake as
no longer required.
2019-09-13 09:43:04 -07:00
Geert Janssens
82b3af9695 Change scheme file compile command invocation
This
* adds normal double quotes around the guild function call
* removes escaped quotes from paths
* add 'VERBATIM' keyword to let cmake perform its own escape logic on the commands

Verified to work on Windows and linux with both ninja and make.
2019-09-12 22:54:24 +02:00
Geert Janssens
f39275be32 RptCleanup - Add cmake command to generated compat modules for deprecated guile modules
The function accepts the name of a deprecated module and optionally a
replacement module.
With that info it will generate a stub guile module that
- will be installed in the gnucash guile load path
- emits a deprecation warning when the old module is used
- if a replacement module is given, will automatically load that module instead

This allows us to gently deprecate complete guile modules without
the burden of manually maintaining their module files.
2019-06-18 14:25:04 +02:00
Geert Janssens
32a83678c9 RptCleanup - Install our guile api as a guile site module
This is similar to how our python code is installed as a python site module
2019-06-18 14:25:04 +02:00
Geert Janssens
91adf868f4 BuildSystem - drop load path for no longer existing build-config.scm 2019-06-14 16:21:43 +02:00
Geert Janssens
8aa696223b Always add share/scm to GUILE_LOAD_PATH
Any scm file that will be built may need access to other scheme files that may have
been linked into that directory. As it was only scm files that would be linked
themselves would also be built with the search path set, causing other linked files
not to be found for an scm file that doesn't add a link for itself.
2019-06-12 15:16:30 +02:00
Geert Janssens
cc7ca438c0 Merge branch 'maint' 2019-05-27 11:58:18 +02:00
Geert Janssens
b7479e8fb0 Bump minimum cmake version to 3.5
This version is available for all supported platforms and distros
(CentOS can have a version via EPEL, which is required anyway)

Advantages:
- one cmake version for all platforms
- we can drop all conditions based on cmake version
2019-05-25 12:04:51 +02:00
John Ralls
141e777893 Suppress installing Scheme test programs. 2019-05-25 10:07:42 +02:00
John Ralls
3815e17e9f Replace VERSION_GREATER_EQUAL with VERSION_GREATER OR VERSION_EQUAL.
The former wasn't introduced until Cmake 3.7.
2019-04-22 12:12:03 -07:00
John Ralls
79f4536a0f Fix typo 2019-04-22 11:28:08 -07:00
John Ralls
4f51f17223 Remove unset _GUILE_LD_LIBRARY_PATH from GncAddSchemeTargets. 2019-04-22 11:26:19 -07:00
John Ralls
b1fdf781ec Adjust GncAddSchemeTargets.cmake to build with Guile2.2 on MinGS64. 2019-04-22 11:26:19 -07: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
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
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
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