From b48ab72cf067c5e61c734ac4a262643877e62994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Guzm=C3=A1n?= Date: Thu, 12 Dec 2024 12:37:53 -0600 Subject: [PATCH] detect MSVC usage previous check tested for compiler ID, fixed the detection to an specific MSVC macro and the current C++ version so it does not override an user specified version --- meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 1fb4e62c..c49d2b8a 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('tracy', ['cpp'], version: '0.11.0', meson_version: '>=1.1.0') +project('tracy', ['cpp'], version: '0.11.1', meson_version: '>=1.3.0', default_options : ['cpp_std=c++11']) # internal compiler flags tracy_compile_args = [] @@ -189,8 +189,9 @@ tracy_public_include_dirs = include_directories('public') compiler = meson.get_compiler('cpp') override_options = [] -if compiler.get_id() != 'msvc' and compiler.get_id() != 'clang-cl' - override_options += 'cpp_std=c++11' +# MSVC c++ lib does not work properly with C++11 and compilation may fail +if compiler.has_define('_MSC_VER') and get_option('cpp_std') == 'c++11' + override_options += 'cpp_std=c++14' endif tracy_compile_args += tracy_common_args