Index: third_party/dmg_fp/dmg_fp.scons |
=================================================================== |
--- third_party/dmg_fp/dmg_fp.scons (revision 0) |
+++ third_party/dmg_fp/dmg_fp.scons (revision 0) |
@@ -0,0 +1,45 @@ |
+# Copyright (c) 2008 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+Import('env') |
+ |
+env = env.Clone() |
+ |
+# Do *NOT* define USE_LOCALE here. We want these functions to be |
+# locale-independent, for example to use in parsers or serializers. |
+env.Append( |
+ # TODO(sgk): Review this when we want to support more architectures. |
+ CPPDEFINES = [ |
+ 'IEEE_8087', |
+ ], |
+) |
+ |
+if env['PLATFORM'] == 'win32': |
+ env.Append( |
+ CCFLAGS = [ |
+ '/TC', |
+ |
+ '/wd4800', |
+ '/wd4244', |
+ ], |
+ ) |
+ |
+if env['PLATFORM'] in ('darwin', 'posix'): |
+ # As usual with third party code, it generates lots of warnings. |
+ # Disable only what's necessary. |
+ env.Append( |
+ CCFLAGS = [ |
+ '-Wno-parentheses', |
+ '-Wno-sign-compare', |
+ '-Wno-unused-label', |
+ '-Wno-write-strings', |
+ ] |
+ ) |
+ |
+input_files = [ |
+ 'dtoa.cc', |
+ 'g_fmt.cc', |
+] |
+ |
+env.ChromeStaticLibrary('dmg_fp', input_files) |