meson: Cleanup

Change-Id: I1d029117e1a5324f0bf2e013db91c23b08bdbe26
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/meson.build b/src/meson.build
index a169421..6a5b73d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -38,11 +38,16 @@
   span_dep,
 ]
 
+stdplus_srcs = [
+  'stdplus/exception.cpp',
+  'stdplus/signal.cpp',
+]
+
 has_fd = false
 if not get_option('fd').disabled() and has_span
   has_fd = true
 
-  fd_srcs = [
+  stdplus_srcs += [
     'stdplus/fd/create.cpp',
     'stdplus/fd/dupable.cpp',
     'stdplus/fd/impl.cpp',
@@ -65,9 +70,7 @@
 
 stdplus_lib = library(
   'stdplus',
-  'stdplus/exception.cpp',
-  'stdplus/signal.cpp',
-  fd_srcs,
+  stdplus_srcs,
   include_directories: stdplus_headers,
   implicit_include_directories: false,
   dependencies: stdplus_deps,
diff --git a/test/meson.build b/test/meson.build
index 6be8abc..df694b6 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -36,6 +36,8 @@
     'fd/mock',
     'fd/ops',
   ]
+elif build_tests.enabled()
+  error('Not testing file descriptor feature')
 else
   warning('Not testing file descriptor feature')
 endif