diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 20:08:02 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 20:08:02 +0000 |
commit | 99e5fddb8c190b868a2d8f2ba459e7cc24814bab (patch) | |
tree | b92d517cc09bf225322053de95b9a7c9a8becb59 /build/SConscript.googleurl | |
parent | 17202d6b5a96c1ae41110e68394e42aa9c2d782e (diff) | |
download | chromium_src-99e5fddb8c190b868a2d8f2ba459e7cc24814bab.zip chromium_src-99e5fddb8c190b868a2d8f2ba459e7cc24814bab.tar.gz chromium_src-99e5fddb8c190b868a2d8f2ba459e7cc24814bab.tar.bz2 |
Manually specify where googleurl object files should be
generated. They're currently ending up in src/build/googleurl
but they should be in $TARGET_ROOT/googleurl.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/SConscript.googleurl')
-rw-r--r-- | build/SConscript.googleurl | 66 |
1 files changed, 39 insertions, 27 deletions
diff --git a/build/SConscript.googleurl b/build/SConscript.googleurl index 9792fb5..11ca7c7 100644 --- a/build/SConscript.googleurl +++ b/build/SConscript.googleurl @@ -27,26 +27,35 @@ if env['PLATFORM'] == 'win32': ], ) -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', +lib_input_files = [ + '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', 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,17 +75,20 @@ 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. - '#/../base/run_all_unittests.cc' + 'gurl_unittest.cc', + 'url_canon_unittest.cc', + 'url_parse_unittest.cc', + 'url_util_unittest.cc', ] -gurl_unittests = env_tests.ChromeTestProgram('googleurl_unittests', test_files) +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. +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.Install('$TARGET_ROOT', gurl_unittests) |