From e85076c4916f67c0398d3b325c5bb04f19517d77 Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" <pesco@khjk.org> Date: Wed, 15 Feb 2023 19:53:37 +0100 Subject: [PATCH] invert the scons --tests option into --no-tests This actually allows with_tests to be set to false. Fixes #4. Also adds a note about this flag to the README. --- README.md | 5 ++++- SConstruct | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b12b5e2b..561f3b92 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,10 @@ Installing * mono-devel and mono-mcs (>= 3.0.6) (for .NET bindings) * [nunit](http://www.nunit.org/) (for testing .NET bindings) -To build, type `scons`. To run the built-in test suite, type `scons test`. For a debug build, add `--variant=debug`. +To build, type `scons`. +To run the built-in test suite, type `scons test`. +To avoid the test dependencies, add `--no-tests`. +For a debug build, add `--variant=debug`. To build bindings, pass a "bindings" argument to scons, e.g. `scons bindings=python`. `scons bindings=python test` will build Python bindings and run tests for both C and Python. `--variant=debug` is valid here too. You can build more than one set of bindings at a time; just separate them with commas, e.g. `scons bindings=python,perl`. diff --git a/SConstruct b/SConstruct index 0aa5670f..96c5d047 100644 --- a/SConstruct +++ b/SConstruct @@ -103,11 +103,11 @@ AddOption('--in-place', action='store_true', help='Build in-place, rather than in the build/<variant> tree') -AddOption('--tests', +AddOption('--no-tests', dest='with_tests', default=env['PLATFORM'] != 'win32', - action='store_true', - help='Build tests') + action='store_false', + help='Do not build tests') env['CC'] = os.getenv('CC') or env['CC'] env['CXX'] = os.getenv('CXX') or env['CXX'] -- GitLab