Skip to content

Commit

Permalink
build: Reorder statements
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Oct 12, 2024
1 parent 74c98d2 commit 7a27776
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ test_src = [
'test/at_quick_exit_ignored_on__Exit.c',
'test/cxx11_no_exceptions.cpp',
'test/cxx11_pedantic.cpp',
'test/mutex.cpp',
'test/mutex_ctor_constexpr.cpp',
'test/mutex.cpp',
'test/mutex_nonrecursive.cpp',
'test/mutex_try_lock.cpp',
'test/timed_mutex_try_lock_until.cpp',
Expand Down Expand Up @@ -371,6 +371,10 @@ foreach src: test_src
test_c_args = [ '-std=c99', '-Wpedantic' ]
endif

if src.endswith('.cpp')
test_link_args = [ '-static-libgcc', '-static-libstdc++' ]
endif

if src in [ 'test/cxx11_no_exceptions.cpp' ]
test_cpp_args = [ '-std=c++11', '-fno-rtti', '-fno-exceptions' ]
endif
Expand All @@ -379,10 +383,6 @@ foreach src: test_src
test_cpp_args = [ '-std=c++11', '-Wpedantic' ]
endif

if src.endswith('.cpp')
test_link_args = [ '-static-libgcc', '-static-libstdc++' ]
endif

test_exe = executable(src.underscorify(), src,
c_args: test_c_args,
cpp_args: test_cpp_args,
Expand Down

0 comments on commit 7a27776

Please sign in to comment.