From 4f5e6f8bdaf335ef3d3881f5ef175128de97d6ea Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 26 Nov 2019 21:51:50 +0300 Subject: Use switch in buildfile --- bpkg/buildfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bpkg') diff --git a/bpkg/buildfile b/bpkg/buildfile index ca3cdb9..4814720 100644 --- a/bpkg/buildfile +++ b/bpkg/buildfile @@ -85,10 +85,14 @@ for t: cxx{**.test...} # # Disable "unknown pragma" warnings. # -if ($cxx.class == 'msvc') - cxx.coptions += /wd4068 -elif ($cxx.class == 'gcc') - cxx.coptions += -Wno-unknown-pragmas +switch $cxx.class +{ + case 'msvc' + cxx.coptions += /wd4068 + + case 'gcc' + cxx.coptions += -Wno-unknown-pragmas +} # VC14 has issues with decorating long names. # -- cgit v1.1