From 9511e39fc09dc550536d1fcfc2a5a2f6d5dd472c Mon Sep 17 00:00:00 2001 From: no92 Date: Sat, 1 Jun 2024 10:38:14 +0200 Subject: [PATCH] meta: only check for the C++ compiler when needed This avoids the check when it is unnecessary, as that might be unwanted in some cases. For instance, using `subproject("bragi")` would trigger the check, even if the intent is only to get the dependency to pull in the support headers, where no compiler is necessary. This becomes relevant when building `mlibc-headers`, as that is required for building a cross-gcc, and as such has no cross-gcc available. --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 7dd4d00..e06de41 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('bragi', 'cpp', default_options: ['cpp_std=c++2a']) +project('bragi', default_options: ['cpp_std=c++2a']) bragi_inc = include_directories('include') bragi_dep = declare_dependency(include_directories: bragi_inc) @@ -13,5 +13,6 @@ if get_option('install_headers') endif if get_option('build_tests') + add_languages('cpp') subdir('tests') endif