# -*- mode: python -*- Import("env") env = env.Clone() if env.TargetOSIs('windows'): env.Prepend(CCFLAGS=[ # 'function' : destructor never returns, potential memory leak '/wd4722', ]) env.Append(LIBS=["ShLwApi"]) if not env.TargetOSIs('windows'): env.AddToCCFLAGSIfSupported('-Wno-unused-but-set-variable') env.Append( CPPDEFINES=["HAVE_STD_REGEX"], CXXFLAGS=[] if env.TargetOSIs('windows') else [ # TODO(SERVER-59996): Fix warnings with -Wstringop-truncation when possible '-Wno-unknown-warning-option', '-Wno-stringop-truncation', ], ) src_dir = env.Dir('dist/src') env.Library( target="benchmark", source=env.File( [ 'benchmark_api_internal.cc', 'benchmark.cc', 'benchmark_name.cc', 'benchmark_register.cc', 'benchmark_runner.cc', 'colorprint.cc', 'commandlineflags.cc', 'complexity.cc', 'console_reporter.cc', 'counter.cc', 'csv_reporter.cc', 'json_reporter.cc', 'reporter.cc', 'sleep.cc', 'statistics.cc', 'string_util.cc', 'sysinfo.cc', 'timers.cc', ], src_dir, ), )