Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: src/platform/power_manager/SConstruct

Issue 652147: Add xidle library to power_manager for testing how long the user has been idle (Closed)
Patch Set: Fix issues pointed out by rtc Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/platform/power_manager/testrunner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/power_manager/SConstruct
diff --git a/src/platform/power_manager/SConstruct b/src/platform/power_manager/SConstruct
new file mode 100644
index 0000000000000000000000000000000000000000..59b019a937b208ec3ebfe81113737338defdbb01
--- /dev/null
+++ b/src/platform/power_manager/SConstruct
@@ -0,0 +1,44 @@
+# Copyright (c) 2009-2010 The Chromium OS 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 os
+import itertools
+
+
+Help('''\
+Type: 'scons' to build and 'scons -c' to clean\
+''')
+
+# Create a base environment including things that are likely to be common
+# to all of the objects in this directory. We pull in overrides from the
+# environment to enable cross-compile.
+base_env = Environment()
+for key in Split('CC CXX AR RANLIB LD NM'):
+ value = os.environ.get(key)
+ if value != None:
+ base_env[key] = value
+for key in Split('CFLAGS CCFLAGS CPPPATH LIBPATH'):
+ value = os.environ.get(key)
+ if value != None:
+ base_env[key] = Split(value)
+
+base_env['CPPFLAGS'] = ['-D__STDC_FORMAT_MACROS']
+
+# Fix issue with scons not passing some vars through the environment.
+for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'):
+ if os.environ.has_key(key):
+ base_env['ENV'][key] = os.environ[key]
+
+# Build example program
+base_env.Append(LIBS=Split('Xss'))
+base_env.Append(CPPPATH=['..'])
+xidle = base_env.Library('xidle', ['xidle.cc'])
+xidle_example = base_env.Program('xidle-example', ['xidle-example.cc', xidle])
+Default(xidle_example)
+
+# Build unit tests
+test_env = base_env.Clone()
+test_env.Append(LIBS=['gtest'])
+test_env.Program('xidle_unittest', ['testrunner.cc', 'xidle_unittest.cc', xidle])
+tests = []
« no previous file with comments | « no previous file | src/platform/power_manager/testrunner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698