Skip to content

Commit b48ab72

Browse files
committed
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
1 parent 45c4dc5 commit b48ab72

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎meson.build‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
project('tracy', ['cpp'], version: '0.11.0', meson_version: '>=1.1.0')
1+
project('tracy', ['cpp'], version: '0.11.1', meson_version: '>=1.3.0', default_options : ['cpp_std=c++11'])
22

33
# internal compiler flags
44
tracy_compile_args = []
@@ -189,8 +189,9 @@ tracy_public_include_dirs = include_directories('public')
189189

190190
compiler = meson.get_compiler('cpp')
191191
override_options = []
192-
if compiler.get_id() != 'msvc' and compiler.get_id() != 'clang-cl'
193-
override_options += 'cpp_std=c++11'
192+
# MSVC c++ lib does not work properly with C++11 and compilation may fail
193+
if compiler.has_define('_MSC_VER') and get_option('cpp_std') == 'c++11'
194+
override_options += 'cpp_std=c++14'
194195
endif
195196

196197
tracy_compile_args += tracy_common_args

0 commit comments

Comments
 (0)