| OLD | NEW |
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 Import('env') | 5 Import('env') |
| 6 | 6 |
| 7 env = env.Clone() | 7 env = env.Clone() |
| 8 | 8 |
| 9 env.Prepend( | 9 env.Prepend( |
| 10 CPPPATH = [ | 10 CPPPATH = [ |
| 11 '$GTEST_DIR', | 11 '$GTEST_DIR', |
| 12 '$GTEST_DIR/include', | 12 '$GTEST_DIR/include', |
| 13 ], | 13 ], |
| 14 ) | 14 ) |
| 15 | 15 |
| 16 if env.Bit('windows'): | 16 if env.Bit('windows'): |
| 17 env.Append( | 17 env.Append( |
| 18 CCFLAGS = [ | 18 CCFLAGS = [ |
| 19 '/TP', | 19 '/TP', |
| 20 | 20 |
| 21 '/WX', | 21 '/WX', |
| 22 '/Wp64', | 22 '/Wp64', |
| 23 ], | 23 ], |
| 24 ) | 24 ) |
| 25 | 25 |
| 26 input_files = ChromeFileList([ | 26 input_files = ChromeFileList([ |
| 27 'gtest/include/gtest/internal/gtest-death-test-internal.h', | 27 # TODO(sgk): violate standard indentation so we don't have to |
| 28 # reindent too much when we remove the explicit MSVSFilter() calls |
| 29 # in favor of generating the hierarchy to reflect the file system. |
| 30 MSVSFilter('src', [ |
| 28 'gtest/src/gtest-death-test.cc', | 31 'gtest/src/gtest-death-test.cc', |
| 32 'gtest/src/gtest-filepath.cc', |
| 33 'gtest/src/gtest-internal-inl.h', |
| 34 'gtest/src/gtest-port.cc', |
| 35 'gtest/src/gtest-test-part.cc', |
| 36 'gtest/src/gtest.cc', |
| 37 ]), |
| 38 MSVSFilter('include', [ |
| 29 'gtest/include/gtest/gtest-death-test.h', | 39 'gtest/include/gtest/gtest-death-test.h', |
| 30 'gtest/src/gtest-filepath.cc', | |
| 31 'gtest/include/gtest/internal/gtest-filepath.h', | |
| 32 'gtest/src/gtest-internal-inl.h', | |
| 33 'gtest/include/gtest/internal/gtest-internal.h', | |
| 34 'gtest/include/gtest/gtest-message.h', | 40 'gtest/include/gtest/gtest-message.h', |
| 35 'gtest/src/gtest-port.cc', | 41 'gtest/include/gtest/gtest-param-test.h', |
| 36 'gtest/include/gtest/internal/gtest-port.h', | |
| 37 'gtest/include/gtest/gtest-spi.h', | 42 'gtest/include/gtest/gtest-spi.h', |
| 38 'gtest/include/gtest/internal/gtest-string.h', | 43 'gtest/include/gtest/gtest-test-part.h', |
| 39 'gtest/src/gtest.cc', | 44 'gtest/include/gtest/gtest-typed-test.h', |
| 40 'gtest/include/gtest/gtest.h', | 45 'gtest/include/gtest/gtest.h', |
| 41 'gtest/include/gtest/gtest_pred_impl.h', | 46 'gtest/include/gtest/gtest_pred_impl.h', |
| 42 'gtest/include/gtest/gtest_prod.h', | 47 'gtest/include/gtest/gtest_prod.h', |
| 43 'gtest/src/gtest-test-part.cc', | 48 MSVSFilter('internal', [ |
| 44 'multiprocess_func_list.cc', | 49 'gtest/include/gtest/internal/gtest-death-test-internal.h', |
| 50 'gtest/include/gtest/internal/gtest-filepath.h', |
| 51 'gtest/include/gtest/internal/gtest-internal.h', |
| 52 'gtest/include/gtest/internal/gtest-linked_ptr.h', |
| 53 'gtest/include/gtest/internal/gtest-param-util-generated.h', |
| 54 'gtest/include/gtest/internal/gtest-param-util.h', |
| 55 'gtest/include/gtest/internal/gtest-port.h', |
| 56 'gtest/include/gtest/internal/gtest-string.h', |
| 57 'gtest/include/gtest/internal/gtest-type-util.h', |
| 58 ]), |
| 59 ]), |
| 60 'multiprocess_func_list.cc', |
| 61 'multiprocess_func_list.h', |
| 62 'platform_test.h', |
| 45 ]) | 63 ]) |
| 46 | 64 |
| 47 env.ChromeLibrary('gtest', input_files) | 65 env.ChromeLibrary('gtest', input_files) |
| 48 | 66 |
| 49 p = env.ChromeMSVSProject('gtest.vcproj', | 67 p = env.ChromeMSVSProject('gtest.vcproj', |
| 68 dest='$CHROME_SRC_DIR/testing/gtest.vcproj', |
| 50 guid='{BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}', | 69 guid='{BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}', |
| 51 files=input_files, | 70 files=input_files, |
| 71 relative_path_prefix=r'./', |
| 52 tools = [ | 72 tools = [ |
| 53 'VCPreBuildEventTool', | 73 'VCPreBuildEventTool', |
| 54 'VCCustomBuildTool', | 74 'VCCustomBuildTool', |
| 55 'VCXMLDataGeneratorTool', | 75 'VCXMLDataGeneratorTool', |
| 56 'VCWebServiceProxyGeneratorTool', | 76 'VCWebServiceProxyGeneratorTool', |
| 57 'VCMIDLTool', | 77 'VCMIDLTool', |
| 58 'VCCLCompilerTool', | 78 'VCCLCompilerTool', |
| 59 'VCManagedResourceCompilerTool', | 79 'VCManagedResourceCompilerTool', |
| 60 'VCResourceCompilerTool', | 80 'VCResourceCompilerTool', |
| 61 'VCPreLinkEventTool', | 81 'VCPreLinkEventTool', |
| 62 'VCLibrarianTool', | 82 'VCLibrarianTool', |
| 63 'VCALinkTool', | 83 'VCALinkTool', |
| 64 'VCXDCMakeTool', | 84 'VCXDCMakeTool', |
| 65 'VCBscMakeTool', | 85 'VCBscMakeTool', |
| 66 'VCFxCopTool', | 86 'VCFxCopTool', |
| 67 'VCPostBuildEventTool', | 87 'VCPostBuildEventTool', |
| 68 ]) | 88 ], |
| 89 ConfigurationType = '4') |
| 69 | 90 |
| 70 p.AddConfig('Debug|Win32', | 91 p.AddConfig('Debug|Win32', |
| 71 ConfigurationType = '4', | |
| 72 InheritedPropertySheets = [ | 92 InheritedPropertySheets = [ |
| 73 '$(SolutionDir)../build/debug.vsprops', | 93 '$(SolutionDir)../build/debug.vsprops', |
| 74 './using_gtest.vsprops', | 94 './using_gtest.vsprops', |
| 75 ]) | 95 ]) |
| 76 | 96 |
| 77 p.AddConfig('Release|Win32', | 97 p.AddConfig('Release|Win32', |
| 78 ConfigurationType = '4', | |
| 79 InheritedPropertySheets = [ | 98 InheritedPropertySheets = [ |
| 80 '$(SolutionDir)../build/release.vsprops', | 99 '$(SolutionDir)../build/release.vsprops', |
| 81 './using_gtest.vsprops', | 100 './using_gtest.vsprops', |
| 82 ]) | 101 ]) |
| 83 | |
| 84 env.AlwaysBuild(p) | |
| 85 | |
| 86 i = env.Command('$CHROME_SRC_DIR/testing/gtest.vcproj', p, | |
| 87 Copy('$TARGET', '$SOURCE')) | |
| 88 Alias('msvs', i) | |
| OLD | NEW |