diff --git a/README.md b/README.md index 55e79549..8ae859cb 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ default values. ``` usage: mfpymake [-h] [-fc {ifort,mpiifort,gfortran,none}] [-cc {gcc,clang,clang++,icc,icl,mpiicc,g++,cl,none}] [-ar {ia32,ia32_intel64,intel64}] [-mc] [-dbl] [-dbg] [-e] [-dr] [-sd] [-ff FFLAGS] - [-cf CFLAGS] [-sl {-lc,-lm}] [-mf] [-md] [-cs COMMONSRC] [-ef EXTRAFILES] [-exf EXCLUDEFILES] [-so] [-ad APPDIR] [-v] [--keep] [--zip ZIP] [--inplace] [--networkx] [--meson] [--mesondir] + [-cf CFLAGS] [-sl {-lc,-lm}] [-mf] [-md] [-cs COMMONSRC] [-ef EXTRAFILES] [-exf EXCLUDEFILES] [-so] [-ad APPDIR] [-v] [--keep] [--zip ZIP] [--inplace] [--networkx] [--meson | --no-meson] [--mesondir MESONDIR] srcdir target This is the pymake program for compiling fortran, c, and c++ source @@ -107,7 +107,7 @@ options: --zip ZIP Zip built executable. (default is None) --inplace Source files in srcdir are used directly. (default is False) --networkx Use networkx package to build Directed Acyclic Graph use to determine the order source files are compiled in. (default is False) - --meson Use meson to build executable. (default is False) + --meson, --no-meson Use meson to build executable. Use --no-meson to build with the pymake build engine. (default is True) --mesondir meson directory. (default is '.') Note that the source directory should not contain any bad diff --git a/autotest/test_build.py b/autotest/test_build.py index 2b323805..9948ec06 100644 --- a/autotest/test_build.py +++ b/autotest/test_build.py @@ -66,6 +66,8 @@ def test_build(function_tmpdir, target: str) -> None: pm = pymake.Pymake(verbose=True) pm.target = target pm.inplace = True + # meson is the default, so the pymake build engine is asked for here + pm.meson = False fc = os.environ.get("FC", "gfortran") assert pymake.build_apps(target, pm, verbose=True, clean=False) == 0, ( f"could not compile {target}" diff --git a/docs/build_apps.md b/docs/build_apps.md index a08b1b47..c8590ed0 100644 --- a/docs/build_apps.md +++ b/docs/build_apps.md @@ -8,7 +8,7 @@ and options can be determined by executing: $ make-program --help usage: make-program [-h] [--exclude EXCLUDE] [-fc {ifort,mpiifort,gfortran,none}] [-cc {gcc,clang,clang++,icc,icl,mpiicc,g++,cl,none}] [-dbl] [-dr] [-ff FFLAGS] [-cf CFLAGS] [-ad APPDIR] [-v] [--keep] [--zip ZIP] - [--meson] + [--meson | --no-meson] targets Download and build USGS MODFLOW and related programs. @@ -37,7 +37,8 @@ options: -v, --verbose Verbose output to terminal. (default is False) --keep Keep existing executable. (default is False) --zip ZIP Zip built executable. (default is None) - --meson Use meson to build executable. (default is False) + --meson, --no-meson Use meson to build executable. Use --no-meson to + build with the pymake build engine. (default is True) Examples: diff --git a/docs/getting_started.md b/docs/getting_started.md index 548a7893..7e4b131b 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -31,7 +31,7 @@ usage: mfpymake [-h] [-fc {ifort,mpiifort,gfortran,none}] [-dr] [-sd] [-ff FFLAGS] [-cf CFLAGS] [-sl {-lc,-lm}] [-mf] [-md] [-cs COMMONSRC] [-ef EXTRAFILES] [-exf EXCLUDEFILES] [-so] [-ad APPDIR] [-v] [--keep] [--zip ZIP] [--inplace] - [--networkx] [--meson] [--mesondir] + [--networkx] [--meson | --no-meson] [--mesondir MESONDIR] srcdir target This is the pymake program for compiling fortran, c, and c++ source @@ -107,7 +107,8 @@ optional arguments: --networkx Use networkx package to build Directed Acyclic Graph use to determine the order source files are compiled in. (default is False) - --meson Use meson to build executable. (default is False) + --meson, --no-meson Use meson to build executable. Use --no-meson to + build with the pymake build engine. (default is True) --mesondir meson directory. (default is '.') Note that the source directory should not contain any bad diff --git a/pymake/pymake_parser.py b/pymake/pymake_parser.py index 42c1ce37..65378e9f 100644 --- a/pymake/pymake_parser.py +++ b/pymake/pymake_parser.py @@ -301,10 +301,11 @@ def _get_standard_arg_dict(): }, "meson": { "tag": ("--meson",), - "help": """Use meson to build executable. (default is False)""", - "default": False, + "help": """Use meson to build executable. Use --no-meson to build + with the pymake build engine. (default is True)""", + "default": True, "choices": None, - "action": "store_true", + "action": argparse.BooleanOptionalAction, }, "mesondir": { "tag": ("--mesondir",),