Browse Source

build flags: underscorify and simplify

cairo_optimizations
Alexandros Theodotou 3 years ago
parent
commit
35ae1e5b6a
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 6
      .builds/archlinux.yml
  2. 2
      .builds/debian10.yml
  3. 4
      .builds/debian9.yml
  4. 2
      .builds/fedora.yml
  5. 2
      .builds/freebsd.yml
  6. 2
      .builds/ubuntu.yml
  7. 2
      .builds/ubuntu1804.yml
  8. 4
      .travis.yml
  9. 2
      HACKING.md
  10. 2
      data/meson.build
  11. 4
      doc/man/meson.build
  12. 8
      doc/user/meson.build
  13. 2
      git-packaging-hooks/post-commit
  14. 34
      meson.build
  15. 22
      meson_options.txt
  16. 4
      scripts/meson.build
  17. 4
      tests/meson.build

6
.builds/archlinux.yml

@ -36,7 +36,7 @@ secrets: @@ -36,7 +36,7 @@ secrets:
tasks:
- setup: |
cd zrythm
meson build -Denable-tests=true -Dwith-manpage=true -Dffmpeg=enabled -Db_coverage=true
meson build -Dtests=true -Dmanpage=true -Dffmpeg=enabled -Db_coverage=true
- build: |
cd zrythm
ninja -C build
@ -51,9 +51,9 @@ tasks: @@ -51,9 +51,9 @@ tasks:
ninja -C build test
meson build --reconfigure -Dsdl=enabled -Drtaudio=disabled -Drtmidi=disabled
ninja -C build test
meson build --reconfigure -Dgraphviz=disabled -Dtrial-ver=true -Dstrict-flags=true -Dwith-dseg-font=false
meson build --reconfigure -Dgraphviz=disabled -Dtrial_ver=true -Dstrict_flags=true -Ddseg_font=false
ninja -C build test
meson build --reconfigure -Dstrict-flags=true -Dwith-user-manual=true -Dguile=disabled
meson build --reconfigure -Dstrict_flags=true -Duser_manual=true -Dguile=disabled
ninja -C build test
meson build --reconfigure -Drtaudio=auto -Drtmidi=disabled
ninja -C build test

2
.builds/debian10.yml

@ -33,7 +33,7 @@ sources: @@ -33,7 +33,7 @@ sources:
tasks:
- setup: |
cd zrythm
../meson/meson.py build -Denable-tests=true -Dwith-manpage=true -Dffmpeg=enabled
../meson/meson.py build -Dtests=true -Dmanpage=true -Dffmpeg=enabled
- build: |
cd zrythm
ninja -C build

4
.builds/debian9.yml

@ -7,7 +7,7 @@ packages: @@ -7,7 +7,7 @@ packages:
#- meson
- ninja-build
- gettext
- guile-2.2-dev
- guile-2.0
- help2man
- python3-sphinx
- ladspa-sdk
@ -33,7 +33,7 @@ sources: @@ -33,7 +33,7 @@ sources:
tasks:
- setup: |
cd zrythm
../meson/meson.py build -Denable-tests=true -Dwith-manpage=true -Dffmpeg=enabled
../meson/meson.py build -Dtests=true -Dmanpage=true -Dffmpeg=enabled -Dguile=disabled
- build: |
cd zrythm
ninja -C build

2
.builds/fedora.yml

@ -33,7 +33,7 @@ sources: @@ -33,7 +33,7 @@ sources:
tasks:
- setup: |
cd zrythm
../meson/meson.py build -Denable-tests=true -Dwith-manpage=true
../meson/meson.py build -Dtests=true -Dmanpage=true
- build: |
cd zrythm
ninja -C build

2
.builds/freebsd.yml

@ -41,7 +41,7 @@ sources: @@ -41,7 +41,7 @@ sources:
tasks:
- setup: |
cd zrythm
CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib meson build -Denable-tests=true -Dwith-manpage=true
CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib meson build -Dtests=true -Dmanpage=true
- build: |
cd zrythm
ninja -C build

2
.builds/ubuntu.yml

@ -33,7 +33,7 @@ sources: @@ -33,7 +33,7 @@ sources:
tasks:
- setup: |
cd zrythm
../meson/meson.py build -Denable-tests=true -Dwith-manpage=true -Dffmpeg=enabled
../meson/meson.py build -Dtests=true -Dmanpage=true -Dffmpeg=enabled
- build: |
cd zrythm
ninja -C build

2
.builds/ubuntu1804.yml

@ -29,7 +29,7 @@ sources: @@ -29,7 +29,7 @@ sources:
tasks:
- setup: |
cd zrythm
../meson/meson.py build -Denable-tests=true -Dwith-manpage=true
../meson/meson.py build -Dtests=true -Dmanpage=true
- build: |
cd zrythm
ninja -C build

4
.travis.yml

@ -64,7 +64,7 @@ script: @@ -64,7 +64,7 @@ script:
set -e
case $TRAVIS_OS_NAME in
osx)
meson build -Dsdl=enabled -Drtaudio=auto -Drtmidi=auto -Denable-tests=true -Dwith-manpage=false
meson build -Dsdl=enabled -Drtaudio=auto -Drtmidi=auto -Dtests=true -Dmanpage=false
ninja -C build
ninja -C build test
sudo ninja -C build install
@ -84,7 +84,7 @@ script: @@ -84,7 +84,7 @@ script:
$mingw64 ninja -C build install
;;
linux)
/tmp/meson/meson.py build -Denable-tests=true -Db_coverage=true
/tmp/meson/meson.py build -Dtests=true -Db_coverage=true
ninja -C build
ninja -C build test
ninja -C build coverage-text

2
HACKING.md

@ -119,7 +119,7 @@ to color all the track backgrounds red. @@ -119,7 +119,7 @@ to color all the track backgrounds red.
# Tests and Coverage
To run the test suite, use
meson build -Denable-tests=true
meson build -Dtests=true
followed by

2
data/meson.build

@ -26,7 +26,7 @@ gschema = configure_file ( @@ -26,7 +26,7 @@ gschema = configure_file (
install_dir: schemasdir)
# install fonts if needed
if get_option('with-dseg-font')
if get_option('dseg_font')
install_subdir (
join_paths ('fonts', 'DSEG14-Classic-MINI'),
install_dir: fontsdir)

4
doc/man/meson.build

@ -35,9 +35,9 @@ manpage = custom_target ( @@ -35,9 +35,9 @@ manpage = custom_target (
'--version-string=Zrythm ' + meson.project_version (),
zrythm_exe,
],
install: get_option ('with-manpage'),
install: get_option ('manpage'),
install_dir: mandir,
build_by_default: get_option ('with-manpage'),
build_by_default: get_option ('manpage'),
)
run_target (

8
doc/user/meson.build

@ -39,9 +39,9 @@ foreach lang : locales @@ -39,9 +39,9 @@ foreach lang : locales
],
output: lang,
command: command,
install: get_option ('with-user-manual'),
install: get_option ('user_manual'),
install_dir: docdir,
build_by_default: get_option ('with-user-manual'),
build_by_default: get_option ('user_manual'),
)
endif
endforeach
@ -49,7 +49,7 @@ endforeach @@ -49,7 +49,7 @@ endforeach
# generate guile docs
guile_docs = []
if guile_dep.found () and get_option ('guile-snarf-docs-path') != ''
if guile_dep.found () and get_option ('guile_snarf_docs_path') != ''
foreach snarfable_src : guile_snarfable_srcs
split_by_dot = snarfable_src.split('.')
without_ext = ''
@ -74,7 +74,7 @@ if guile_dep.found () and get_option ('guile-snarf-docs-path') != '' @@ -74,7 +74,7 @@ if guile_dep.found () and get_option ('guile-snarf-docs-path') != ''
],
command: [
'@INPUT1@',
get_option ('guile-snarf-docs-path'),
get_option ('guile_snarf_docs_path'),
guile_dep.name(), '@INPUT0@',
meson.build_root () / '@OUTPUT@',
meson.build_root () / '@PRIVATE_DIR@',

2
git-packaging-hooks/post-commit vendored

@ -54,7 +54,7 @@ then TraceStage "running staging-specific post-commit hooks" @@ -54,7 +54,7 @@ then TraceStage "running staging-specific post-commit hooks"
rm -rf $tmp_builddir > /dev/null
for compiler in clang gcc; do
for buildtype in debug release; do
CC=$compiler CXX=$compiler meson $tmp_builddir --buildtype=$buildtype -Denable-tests=true 2> /dev/null
CC=$compiler CXX=$compiler meson $tmp_builddir --buildtype=$buildtype -Dtests=true 2> /dev/null
TraceStep "verifying re-build/test"
ninja -C $tmp_builddir test > /dev/null
DESTDIR=$tmp_installdir ninja -C $tmp_builddir install > /dev/null

34
meson.build

@ -45,7 +45,7 @@ samplesdir = join_paths (zrythmdatadir, 'samples') @@ -45,7 +45,7 @@ samplesdir = join_paths (zrythmdatadir, 'samples')
docdir = join_paths (datadir, 'doc', 'zrythm')
sourceviewstylesdir = join_paths (zrythmdatadir, 'sourceview-styles')
# Used for building with-manpages, manual, etc., using
# Used for building manpages, manual, etc., using
# foreach
locales = [
'en', 'en_GB', 'gl', 'de', 'fr', 'it',
@ -94,13 +94,13 @@ cdata.set_quoted ('CONFIGURE_LIBDIR', libdir) @@ -94,13 +94,13 @@ cdata.set_quoted ('CONFIGURE_LIBDIR', libdir)
cdata.set_quoted ('CONFIGURE_BINDIR', bindir)
cdata.set_quoted ('LIB_SUFFIX', lib_suffix)
cdata.set_quoted ('BIN_SUFFIX', bin_suffix)
if get_option ('trial-ver')
if get_option ('trial_ver')
cdata.set('TRIAL_VER', 1)
endif
if get_option ('windows-release')
if get_option ('windows_release')
cdata.set ('WINDOWS_RELEASE', 1)
endif
if get_option ('mac-release')
if get_option ('mac_release')
cdata.set ('MAC_RELEASE', 1)
endif
cdata.set (
@ -115,7 +115,7 @@ cdata.set_quoted ( @@ -115,7 +115,7 @@ cdata.set_quoted (
cdata.set_quoted (
'NEW_ISSUE_URL',
'https://redmine.zrythm.org/projects/zrythm/issues/new')
if (get_option ('with-user-manual'))
if (get_option ('user_manual'))
cdata.set_quoted ('MANUAL_PATH', docdir)
endif
@ -170,10 +170,10 @@ cdata.set_quoted('OPEN_DIR_CMD', open_dir_cmd) @@ -170,10 +170,10 @@ cdata.set_quoted('OPEN_DIR_CMD', open_dir_cmd)
sphinx_build = find_program (
['sphinx-build', 'sphinx-build-3'],
required: get_option ('with-user-manual'))
required: get_option ('user_manual'))
help2man = find_program (
['help2man'],
required: get_option ('with-manpage'))
required: get_option ('manpage'))
stoat = find_program (
['stoat'], required: false)
python3 = find_program (
@ -262,7 +262,7 @@ else @@ -262,7 +262,7 @@ else
]
endif
if get_option ('enable-profiling')
if get_option ('profiling')
test_cflags += [ '-g', '-pg', 'no-pie' ]
endif
@ -369,7 +369,7 @@ if cc.get_id() == 'gcc' @@ -369,7 +369,7 @@ if cc.get_id() == 'gcc'
endif
strict_cflags = []
if get_option ('strict-flags')
if get_option ('strict_flags')
strict_cflags = cc.get_supported_arguments (
test_strict_cflags)
endif
@ -383,7 +383,7 @@ endif @@ -383,7 +383,7 @@ endif
test_ldflags = []
if get_option ('enable-profiling')
if get_option ('profiling')
test_ldflags += [ '-g', '-pg', 'no-pie' ]
endif
@ -727,13 +727,13 @@ meson.add_dist_script ( @@ -727,13 +727,13 @@ meson.add_dist_script (
summary ({
'Build type': get_option('buildtype'),
'Profiling': get_option('enable-profiling'),
'Strict flags': get_option('strict-flags'),
'Build tests': get_option('enable-tests'),
'Build GUI tests': get_option('enable-gui-tests'),
'Build/install manpage': get_option('with-manpage'),
'Build/install user manual': get_option('with-user-manual'),
'Install DSEG font': get_option('with-dseg-font'),
'Profiling': get_option('profiling'),
'Strict flags': get_option('strict_flags'),
'Build tests': get_option('tests'),
'Build GUI tests': get_option('gui_tests'),
'Build/install manpage': get_option('manpage'),
'Build/install user manual': get_option('user_manual'),
'Install DSEG font': get_option('dseg_font'),
'Coverage reports': get_option('b_coverage'),
}, section: 'General')

22
meson_options.txt

@ -16,19 +16,19 @@ @@ -16,19 +16,19 @@
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
option (
'enable-profiling',
'profiling',
type: 'boolean',
value: false,
description: 'Enable profiling with gprof')
option (
'enable-tests',
'tests',
type: 'boolean',
value: false,
description: 'Whether to compile unit tests')
option (
'enable-gui-tests',
'gui_tests',
type: 'boolean',
value: false,
description: 'Whether to compile GUI unit tests')
@ -88,25 +88,25 @@ option ( @@ -88,25 +88,25 @@ option (
description: 'Build with libguile support for scripting')
option (
'with-manpage',
'manpage',
type: 'boolean',
value: true,
description: 'Build and install manpage')
option (
'with-user-manual',
'user_manual',
type: 'boolean',
value: false,
description: 'Build and install user manual')
option (
'strict-flags',
'strict_flags',
type: 'boolean',
value: false,
description: 'Compile and link with strict flags (-Werror)')
option (
'with-dseg-font',
'dseg_font',
type: 'boolean',
value: true,
description: '''Install the DSEG14 font used by the
@ -114,25 +114,25 @@ transport meters. Packagers should turn this off and @@ -114,25 +114,25 @@ transport meters. Packagers should turn this off and
set the font as a dependency instead''')
option (
'windows-release',
'windows_release',
type: 'boolean',
value: false,
description: 'This is only used when making the installers')
option (
'mac-release',
'mac_release',
type: 'boolean',
value: false,
description: 'This is only used when making the installers')
option (
'trial-ver',
'trial_ver',
type: 'boolean',
value: false,
description: 'Whether this is a trial version with limited functionality')
option (
'guile-snarf-docs-path',
'guile_snarf_docs_path',
type: 'string',
value: '',
description: '''Path to guile-snarf-docs (used

4
scripts/meson.build

@ -36,10 +36,10 @@ if guile_snarf.found() @@ -36,10 +36,10 @@ if guile_snarf.found()
scripts_conf += {
'GUILE_SNARF': guile_snarf.path() }
endif
if get_option('guile-snarf-docs-path') != ''
if get_option('guile_snarf_docs_path') != ''
scripts_conf += {
'GUILE_SNARF_DOCS_BIN': get_option (
'guile-snarf-docs-path'),
'guile_snarf_docs_path'),
'GUILD_BIN': guild.path() }
endif

4
tests/meson.build

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
if get_option ('enable-tests')
if get_option ('tests')
subdir('eg-amp.lv2')
subdir('eg-fifths.lv2')
@ -76,7 +76,7 @@ if get_option ('enable-tests') @@ -76,7 +76,7 @@ if get_option ('enable-tests')
]
endif
if get_option ('enable-gui-tests')
if get_option ('gui_tests')
tests += [
['gui/widgets/region', false],
['gui/widgets/track', false],

Loading…
Cancel
Save