diff --git a/faest_128f/meson.build b/faest_128f/meson.build index 7bf4789..049ba2f 100644 --- a/faest_128f/meson.build +++ b/faest_128f/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_128f_bench', bench_sources, dependencies: [libfaest_128f_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_128s/meson.build b/faest_128s/meson.build index 73c12a7..5898f68 100644 --- a/faest_128s/meson.build +++ b/faest_128s/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_128s_bench', bench_sources, dependencies: [libfaest_128s_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_192f/meson.build b/faest_192f/meson.build index 699ff51..ff796c0 100644 --- a/faest_192f/meson.build +++ b/faest_192f/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_192f_bench', bench_sources, dependencies: [libfaest_192f_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_192s/meson.build b/faest_192s/meson.build index cb867c0..d32c1df 100644 --- a/faest_192s/meson.build +++ b/faest_192s/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_192s_bench', bench_sources, dependencies: [libfaest_192s_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_256f/meson.build b/faest_256f/meson.build index 44b2d05..2cc3508 100644 --- a/faest_256f/meson.build +++ b/faest_256f/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_256f_bench', bench_sources, dependencies: [libfaest_256f_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_256s/meson.build b/faest_256s/meson.build index 6132420..0288c58 100644 --- a/faest_256s/meson.build +++ b/faest_256s/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_256s_bench', bench_sources, dependencies: [libfaest_256s_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_em_128f/meson.build b/faest_em_128f/meson.build index c8abaaa..11288b1 100644 --- a/faest_em_128f/meson.build +++ b/faest_em_128f/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_em_128f_bench', bench_sources, dependencies: [libfaest_em_128f_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_em_128s/meson.build b/faest_em_128s/meson.build index ce6b4b1..414ab91 100644 --- a/faest_em_128s/meson.build +++ b/faest_em_128s/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_em_128s_bench', bench_sources, dependencies: [libfaest_em_128s_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_em_192f/meson.build b/faest_em_192f/meson.build index 186a621..34ecb01 100644 --- a/faest_em_192f/meson.build +++ b/faest_em_192f/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_em_192f_bench', bench_sources, dependencies: [libfaest_em_192f_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_em_192s/meson.build b/faest_em_192s/meson.build index 770de51..4ec2428 100644 --- a/faest_em_192s/meson.build +++ b/faest_em_192s/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_em_192s_bench', bench_sources, dependencies: [libfaest_em_192s_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_em_256f/meson.build b/faest_em_256f/meson.build index a05558f..fa45361 100644 --- a/faest_em_256f/meson.build +++ b/faest_em_256f/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_em_256f_bench', bench_sources, dependencies: [libfaest_em_256f_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/faest_em_256s/meson.build b/faest_em_256s/meson.build index 5ffcfbc..a0bec8a 100644 --- a/faest_em_256s/meson.build +++ b/faest_em_256s/meson.build @@ -41,7 +41,7 @@ if openssl.found() override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_em_256s_bench', bench_sources, dependencies: [libfaest_em_256s_dependency, boost_program_options], @@ -76,7 +76,7 @@ if valgrind_exec.found() build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), ) diff --git a/meson_options.txt b/meson_options.txt index b5606fb..d797327 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -19,8 +19,13 @@ option('benchmarks', value: 'auto', description: 'Build benchmark executables' ) +option('catch2', + type: 'feature', + value: 'auto', + description: 'Use catch2 for benchmarks' +) option('march-native', type: 'feature', value: 'disabled', description: 'Build with -march=native' -) \ No newline at end of file +) diff --git a/tools/crypto_sign_generator.py b/tools/crypto_sign_generator.py index e05ef2a..3552f46 100644 --- a/tools/crypto_sign_generator.py +++ b/tools/crypto_sign_generator.py @@ -62,7 +62,7 @@ def generate(param_name): override_options: ['b_lto=false'], ) endif -if boost_program_options.found() +if boost_program_options.found() and get_option('benchmarks').enabled() bench_sources = files(join_paths(meson.project_source_root(), 'tools', 'bench.cpp')) bench = executable('faest_{param_name}_bench', bench_sources, dependencies: [libfaest_{param_name}_dependency, boost_program_options], @@ -97,7 +97,7 @@ def generate(param_name): build_by_default: false, ) endif -if get_option('benchmarks').enabled() +if get_option('catch2').enabled() and get_option('benchmarks').enabled() bench_sources = files( join_paths(meson.project_source_root(), 'tools', 'bench_c2.cpp'), )