Skip to content

Commit 404ff96

Browse files
committed
Merge branch 'feature/add-pre-commit-system' into develop
2 parents ac7268f + b08714f commit 404ff96

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

meson.build

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@ add_global_arguments(
2020
#############################
2121
## Dependencies definition ##
2222
#############################
23-
24-
# options
25-
26-
build_tests = get_option('build_tests')
23+
build_tests = get_option('build-tests')
2724

2825
# directories
29-
projectinc = include_directories('.',
30-
'include')
26+
projectinc = include_directories('.', 'include')
27+
28+
# Install pre-commit hooks
29+
developer_mode = get_option('developer-mode')
30+
if developer_mode
31+
pre_commit = find_program('pre-commit', required: true, native: true)
32+
run_command(pre_commit, 'install', check: false)
33+
run_command(pre_commit, 'install', '--hook-type', 'commit-msg', check: false)
34+
endif
3135

3236
subdir('examples')
3337

meson.options

Lines changed: 0 additions & 10 deletions
This file was deleted.

meson_options.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# See LICENSE for more information about licensing
3+
# Copyright 2023
4+
#
5+
# Author: Diego Arturo Avila Torres <dandida95@gmail.com>
6+
# Luis G. Leon Vega <luis.leon@ieee.org>
7+
#
8+
#
9+
10+
option('build-tests', type: 'boolean', value: false, description: 'Enable test compilation')
11+
option('developer-mode', type : 'boolean', value : true, yield : true, description: 'Enable developer mode')

0 commit comments

Comments
 (0)