From 986db3d538f05a4e8a545849fb88f4121e0b9e17 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Mon, 6 Jan 2025 04:08:54 -0700 Subject: [PATCH] meson: Always include cpp language --- meson.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index c754cb1c99..818a341bd3 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('qemu', ['c'], meson_version: '>=1.5.0', +project('qemu', ['c', 'cpp'], meson_version: '>=1.5.0', default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=c++17', 'b_colorout=auto', 'b_staticpic=false', 'stdsplit=false', 'optimization=3', 'b_pie=true'], version: files('QEMU_VERSION')) @@ -74,11 +74,8 @@ cmake = import('cmake') cmake_macos_arch = host_machine.cpu() == 'aarch64' ? 'arm64' : host_machine.cpu() cc = meson.get_compiler('c') -all_languages = ['c'] -if host_os == 'windows' and add_languages('cpp', required: false, native: false) - all_languages += ['cpp'] - cxx = meson.get_compiler('cpp') -endif +cxx = meson.get_compiler('cpp') +all_languages = ['c', 'cpp'] if host_os == 'darwin' and \ add_languages('objc', required: true, native: false) all_languages += ['objc']