diff options
author | bradnelson@chromium.org <bradnelson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-20 23:29:20 +0000 |
---|---|---|
committer | bradnelson@chromium.org <bradnelson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-20 23:29:20 +0000 |
commit | 1bdfd82cea4f30a5751a19c8283b05f34612a818 (patch) | |
tree | d41f92852dc4b90c2bf4b469252e535761e27152 /build/SConscript.googleurl | |
parent | 126a6c706d0db79f5af75b1f019b831cf9680e70 (diff) | |
download | chromium_src-1bdfd82cea4f30a5751a19c8283b05f34612a818.zip chromium_src-1bdfd82cea4f30a5751a19c8283b05f34612a818.tar.gz chromium_src-1bdfd82cea4f30a5751a19c8283b05f34612a818.tar.bz2 |
Rolling back switch to hammer patterns again.
Review URL: http://codereview.chromium.org/7530
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/SConscript.googleurl')
-rw-r--r-- | build/SConscript.googleurl | 64 |
1 files changed, 37 insertions, 27 deletions
diff --git a/build/SConscript.googleurl b/build/SConscript.googleurl index 4407afc..11ca7c7 100644 --- a/build/SConscript.googleurl +++ b/build/SConscript.googleurl @@ -28,25 +28,34 @@ if env['PLATFORM'] == 'win32': ) lib_input_files = [ - 'src/gurl.cc', - 'src/url_canon_etc.cc', - 'src/url_canon_fileurl.cc', - 'src/url_canon_host.cc', - 'src/url_canon_icu.cc', - 'src/url_canon_internal.cc', - 'src/url_canon_ip.cc', - 'src/url_canon_mailtourl.cc', - 'src/url_canon_path.cc', - 'src/url_canon_pathurl.cc', - 'src/url_canon_query.cc', - 'src/url_canon_relative.cc', - 'src/url_canon_stdurl.cc', - 'src/url_parse.cc', - 'src/url_parse_file.cc', - 'src/url_util.cc', + 'gurl.cc', + 'url_canon_etc.cc', + 'url_canon_fileurl.cc', + 'url_canon_host.cc', + 'url_canon_icu.cc', + 'url_canon_internal.cc', + 'url_canon_ip.cc', + 'url_canon_mailtourl.cc', + 'url_canon_path.cc', + 'url_canon_pathurl.cc', + 'url_canon_query.cc', + 'url_canon_relative.cc', + 'url_canon_stdurl.cc', + 'url_parse.cc', + 'url_parse_file.cc', + 'url_util.cc', ] -env.ChromeStaticLibrary('googleurl', lib_input_files) +def BuildObjectFiles(environ, input_files): + obj_files = [] + for input_file in input_files: + source = '../googleurl/src/' + input_file + target = '$TARGET_ROOT/googleurl/' + input_file[:input_file.find('.cc')] + obj_files.append(environ.StaticObject(source = source, target = target)) + return obj_files + +env.ChromeStaticLibrary('$TARGET_ROOT/googleurl/googleurl', + BuildObjectFiles(env, lib_input_files)) env_tests = env.Clone() @@ -66,20 +75,21 @@ env_tests.Append( ) test_files = [ - 'src/gurl_unittest.cc', - 'src/url_canon_unittest.cc', - 'src/url_parse_unittest.cc', - 'src/url_util_unittest.cc', - # The version of gtest that googleurl uses provides a main() function; ours - # doesn't so include our own main function. - env_tests.ChromeObject('run_all_unittests', - '$OBJ_ROOT/base/run_all_unittests.cc'), + 'gurl_unittest.cc', + 'url_canon_unittest.cc', + 'url_parse_unittest.cc', + 'url_util_unittest.cc', ] +test_obj_files = BuildObjectFiles(env_tests, test_files) # The version of gtest that googleurl uses provides a main() function; ours # doesn't so include our own main function. -gurl_unittests = env_tests.ChromeTestProgram('googleurl_unittests', test_files) +test_obj_files.append(env_tests.StaticObject(source = '../base/run_all_unittests.cc', + target = '$TARGET_ROOT/googleurl/run_all_unittests')) + +gurl_unittests = env_tests.ChromeTestProgram( + '$TARGET_ROOT/googleurl/googleurl_unittests', test_obj_files) -installed_gurl_unittests = env.Replicate('$MAIN_DIR/Hammer', gurl_unittests) +installed_gurl_unittests = env.Install('$TARGET_ROOT', gurl_unittests) env.Alias('googleurl', installed_gurl_unittests) |