From f6a8fe63f09913d1784f974845dcfdfef3d5b93e Mon Sep 17 00:00:00 2001 From: Tudor Bosman Date: Thu, 3 Jul 2014 22:18:06 -0700 Subject: [PATCH] gflags now likes namespace gflags, not google Summary: Use namespace gflags going forward, import namespace google into it if backward. Also added a few "checking for..." messages in autoconf. Test Plan: fbconfig -r folly && fbmake runtests_opt, OSS build Reviewed By: meyering@fb.com Subscribers: fjargsto, ntv, jhj, lesha, kma, davejwatson FB internal diff: D1420575 --- folly/AtomicBitSet.h | 2 + folly/File.h | 2 + folly/Portability.h | 7 + folly/build/GenerateFingerprintTables.cpp | 2 +- folly/configure.ac | 220 ++++++++++++------ .../ExceptionTracerBenchmark.cpp | 2 +- folly/experimental/io/HugePageUtil.cpp | 2 +- folly/experimental/symbolizer/ElfUtil.cpp | 2 +- .../experimental/symbolizer/test/ElfTests.cpp | 2 +- .../symbolizer/test/StackTraceTest.cpp | 2 +- folly/experimental/test/BitsBenchmark.cpp | 2 +- folly/experimental/test/BitsTest.cpp | 2 +- .../experimental/test/EliasFanoCodingTest.cpp | 2 +- folly/experimental/test/EventCountTest.cpp | 2 +- folly/experimental/test/TestUtilTest.cpp | 2 +- folly/gen/test/BaseBenchmark.cpp | 2 +- folly/gen/test/BaseTest.cpp | 2 +- folly/gen/test/CombineTest.cpp | 2 +- folly/gen/test/FileBenchmark.cpp | 2 +- folly/gen/test/FileTest.cpp | 2 +- folly/gen/test/ParallelBenchmark.cpp | 2 +- folly/gen/test/ParallelMapBenchmark.cpp | 2 +- folly/gen/test/ParallelMapTest.cpp | 2 +- folly/gen/test/ParallelTest.cpp | 2 +- folly/gen/test/StringBenchmark.cpp | 2 +- folly/gen/test/StringTest.cpp | 2 +- folly/io/test/CompressionTest.cpp | 2 +- folly/io/test/IOBufCursorTest.cpp | 2 +- folly/io/test/IOBufQueueTest.cpp | 2 +- folly/io/test/IOBufTest.cpp | 2 +- folly/io/test/NetworkBenchmark.cpp | 2 +- folly/io/test/RecordIOTest.cpp | 2 +- folly/test/ArenaTest.cpp | 2 +- folly/test/AsciiCaseInsensitiveBenchmark.cpp | 2 +- folly/test/AsciiCaseInsensitiveTest.cpp | 2 +- folly/test/AtomicBitSetTest.cpp | 2 +- folly/test/AtomicHashMapTest.cpp | 14 +- folly/test/AtomicStructTest.cpp | 2 +- folly/test/BatonTest.cpp | 2 +- folly/test/BenchmarkTest.cpp | 2 +- folly/test/BitIteratorTest.cpp | 2 +- folly/test/BitsTest.cpp | 2 +- folly/test/CacheLocalityTest.cpp | 2 +- folly/test/ChecksumTest.cpp | 2 +- folly/test/ConcurrentSkipListBenchmark.cpp | 2 +- folly/test/ConcurrentSkipListTest.cpp | 2 +- folly/test/ConvTest.cpp | 2 +- folly/test/DeterministicScheduleTest.cpp | 2 +- folly/test/DynamicConverterTest.cpp | 2 +- folly/test/DynamicTest.cpp | 2 +- folly/test/ExceptionTest.cpp | 2 +- folly/test/ExceptionWrapperBenchmark.cpp | 2 +- folly/test/FBStringBenchmark.cpp | 2 +- folly/test/FBStringTest.cpp | 2 +- folly/test/FBVectorBenchmark.cpp | 2 +- folly/test/FBVectorTest.cpp | 2 +- folly/test/FileTestLockHelper.cpp | 2 +- folly/test/FileUtilTest.cpp | 2 +- folly/test/FingerprintTest.cpp | 2 +- folly/test/FormatBenchmark.cpp | 2 +- folly/test/FormatTest.cpp | 2 +- folly/test/FutexTest.cpp | 2 +- folly/test/HistogramBenchmark.cpp | 2 +- folly/test/IndexedMemPoolTest.cpp | 2 +- folly/test/JsonTest.cpp | 2 +- folly/test/LifoSemTests.cpp | 2 +- folly/test/LoggingTest.cpp | 2 +- folly/test/MPMCPipelineTest.cpp | 2 +- folly/test/MPMCQueueTest.cpp | 2 +- folly/test/MemoryIdlerTest.cpp | 2 +- folly/test/ProducerConsumerQueueBenchmark.cpp | 2 +- folly/test/RWSpinLockTest.cpp | 2 +- folly/test/RandomTest.cpp | 2 +- folly/test/RangeFindBenchmark.cpp | 2 +- folly/test/ScopeGuardTest.cpp | 2 +- folly/test/StringTest.cpp | 2 +- .../test/SubprocessTestParentDeathHelper.cpp | 2 +- folly/test/ThreadCachedArenaTest.cpp | 2 +- folly/test/ThreadCachedIntTest.cpp | 6 +- folly/test/ThreadLocalTest.cpp | 6 +- folly/test/TimeseriesBenchmark.cpp | 2 +- folly/test/TraitsTest.cpp | 2 +- folly/test/VarintTest.cpp | 2 +- folly/test/function_benchmark/main.cpp | 2 +- folly/test/stl_tests/StlVectorTest.cpp | 4 +- 85 files changed, 256 insertions(+), 159 deletions(-) diff --git a/folly/AtomicBitSet.h b/folly/AtomicBitSet.h index 48f1fd94..4b030ca9 100644 --- a/folly/AtomicBitSet.h +++ b/folly/AtomicBitSet.h @@ -25,6 +25,8 @@ #include +#include + namespace folly { /** diff --git a/folly/File.h b/folly/File.h index 55608891..2183609b 100644 --- a/folly/File.h +++ b/folly/File.h @@ -22,6 +22,8 @@ #include #include +#include + namespace folly { /** diff --git a/folly/Portability.h b/folly/Portability.h index 7f88cf25..51642a1c 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -233,4 +233,11 @@ typedef SSIZE_T ssize_t; # define __PRETTY_FUNCTION__ __FUNCSIG__ #endif +#if FOLLY_UNUSUAL_GFLAGS_NAMESPACE +namespace FOLLY_GFLAGS_NAMESPACE { } +namespace gflags { +using namespace FOLLY_GFLAGS_NAMESPACE; +} // namespace gflags +#endif + #endif // FOLLY_PORTABILITY_H_ diff --git a/folly/build/GenerateFingerprintTables.cpp b/folly/build/GenerateFingerprintTables.cpp index 3ebb99bc..19d472c0 100644 --- a/folly/build/GenerateFingerprintTables.cpp +++ b/folly/build/GenerateFingerprintTables.cpp @@ -119,7 +119,7 @@ void computeTables(FILE* file, const FingerprintPolynomial& poly) { } // namespace int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); std::string name = folly::format("{}/{}", FLAGS_install_dir, diff --git a/folly/configure.ac b/folly/configure.ac index b0db6b4d..d5465a27 100644 --- a/folly/configure.ac +++ b/folly/configure.ac @@ -90,75 +90,160 @@ AC_CHECK_TYPE([__int128], [AC_DEFINE([HAVE_INT128_T], [1], [Define if __int128 exists])], [AC_DEFINE([HAVE_INT128_T], [0], [Define if __int128 does not exist])]) AC_CHECK_TYPES([ptrdiff_t]) -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE[ - #pragma GCC diagnostic error "-Wattributes" - extern "C" void (*test_ifunc(void))() { return 0; } - void func() __attribute__((ifunc("test_ifunc")));] - ], - [AC_DEFINE([HAVE_IFUNC], [1], [Define to 1 if the compiler supports ifunc])], - [AC_DEFINE([HAVE_IFUNC], [0], [Define to 0 if the compiler doesn't support ifunc])] -) -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE[class C { virtual void f() final {} virtual void g() {} }; - class D : public C { virtual void g() override {} };]], - [AC_DEFINE([FINAL], [final], - [Define to "final" if the compiler supports C++11 "final"]) - AC_DEFINE([OVERRIDE], [override], - [Define to "override" if the compiler supports C++11 "override"])], - [AC_DEFINE([FINAL], [], - [Define to "final" if the compiler supports C++11 "final"]) - AC_DEFINE([OVERRIDE], [], - [Define to "override" if the compiler supports C++11 "override"])] -) - -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE[ - #include - #include - void func() { std::this_thread::sleep_for(std::chrono::seconds(1)); }]], - [AC_DEFINE([HAVE_STD__THIS_THREAD__SLEEP_FOR], [1], - [Define to 1 if std::this_thread::sleep_for() is defined.])]) - -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE[ - #include - static constexpr int val = strlen("foo");]], - [AC_DEFINE([HAVE_CONSTEXPR_STRLEN], [1], - [Define to 1 if strlen(3) is constexpr.])]) - -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE[ - #include - #if !_LIBCPP_VERSION - #error No libc++ - #endif - void func() {}] - ], - [AC_DEFINE([USE_LIBCPP], [1], [Define to 1 if we're using libc++.])]) - -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE[ - #include - const bool val = std::is_trivially_copyable::value;] - ], - [AC_DEFINE([HAVE_STD__IS_TRIVIALLY_COPYABLE], [1], - [Define to 1 if we have a usable std::is_trivially_copyable - implementation.])]) + +AC_CACHE_CHECK( + [for ifunc support], + [folly_cv_prog_cc_ifunc], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE[ + #pragma GCC diagnostic error "-Wattributes" + extern "C" void (*test_ifunc(void))() { return 0; } + void func() __attribute__((ifunc("test_ifunc")));] + ], + [folly_cv_prog_cc_ifunc=yes], + [folly_cv_prog_cc_ifunc=no])]) + +if test "$folly_cv_prog_cc_ifunc" = "yes"; then + AC_DEFINE([HAVE_IFUNC], [1], [Define to 1 if the compiler supports ifunc]) +fi + +AC_CACHE_CHECK( + [for final and override support], + [folly_cv_c_final_override], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE[class C { virtual void f() final {} virtual void g() {} }; + class D : public C { virtual void g() override {} };]], + [folly_cv_c_final_override=yes], + [folly_cv_c_final_override=no])]) + +if test "$folly_cv_c_final_override" = "yes"; then + final_val=final + override_val=override +else + final_val= + override_val= +fi + +AC_DEFINE_UNQUOTED( + [FINAL], [$final_val], + [Define to "final" if the compiler supports C++11 "final"]) +AC_DEFINE_UNQUOTED( + [OVERRIDE], [$override_val], + [Define to "override" if the compiler supports C++11 "override"]) + +AC_CACHE_CHECK( + [for std::this_thread::sleep_for], + [folly_cv_func_this_thread_sleep_for], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE[ + #include + #include + void func() { std::this_thread::sleep_for(std::chrono::seconds(1)); }]], + [folly_cv_func_this_thread_sleep_for=yes], + [folly_cv_func_this_thread_sleep_for=no])]) + +if test "$folly_cv_func_this_thread_sleep_for" = yes; then + AC_DEFINE([HAVE_STD__THIS_THREAD__SLEEP_FOR], [1], + [Define to 1 if std::this_thread::sleep_for() is defined.]) +fi + +AC_CACHE_CHECK( + [for constexpr strlen], + [folly_cv_func_constexpr_strlen], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE[ + #include + static constexpr int val = strlen("foo");]], + [folly_cv_func_constexpr_strlen=yes], + [folly_cv_func_constexpr_strlen=no])]) + +if test "$folly_cv_func_constexpr_strlen" = yes; then + AC_DEFINE([HAVE_CONSTEXPR_STRLEN], [1], + [Define to 1 if strlen(3) is constexpr.]) +fi + +AC_CACHE_CHECK( + [for libc++], + [folly_cv_lib_libcpp], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE[ + #include + #if !_LIBCPP_VERSION + #error No libc++ + #endif + void func() {}] + ], + [folly_cv_lib_libcpp=yes], + [folly_cv_lib_libcpp=no])]) + +if test "$folly_cv_lib_libcpp" = yes; then + AC_DEFINE([USE_LIBCPP], [1], [Define to 1 if we're using libc++.]) +fi + +AC_CACHE_CHECK( + [for usable std::is_trivially_copyable], + [folly_cv_decl_std_is_trivially_copyable], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE[ + #include + const bool val = std::is_trivially_copyable::value;] + ], + [folly_cv_decl_std_is_trivially_copyable=yes], + [folly_cv_decl_std_is_trivially_copyable=no])]) + +if test "$folly_cv_decl_std_is_trivially_copyable" = yes; then + AC_DEFINE([HAVE_STD__IS_TRIVIALLY_COPYABLE], [1], + [Define to 1 if we have a usable std::is_trivially_copyable + implementation.]) +fi + +AC_CACHE_CHECK( + [gflags namespace], + [folly_cv_decl_gflags_namespace], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE[ + #include + void foo() { gflags::GetArgv(); }] + ], + [folly_cv_decl_gflags_namespace=gflags], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE[ + #include + void foo() { google::GetArgv(); }] + ], + [folly_cv_decl_gflags_namespace=google], + [folly_cv_decl_gflags_namespace=error])])]) + +if test "$folly_cv_decl_gflags_namespace" = error; then + AC_MSG_ERROR([Cannot determine gflags namespace]) +else + AC_DEFINE_UNQUOTED( + [GFLAGS_NAMESPACE], [$folly_cv_decl_gflags_namespace], + [Define to gflags namespace (usually "google" or "gflags")]) + if test "$folly_cv_decl_gflags_namespace" != gflags; then + AC_DEFINE([UNUSUAL_GFLAGS_NAMESPACE], [1], + [Define to 1 if the gflags namespace is not "gflags"]) + fi +fi # Figure out if we support weak symbols. If not, we will link in some null # stubs for functions that would otherwise be weak. -AC_LINK_IFELSE( - [AC_LANG_SOURCE[ - extern "C" void configure_link_extern_weak_test() __attribute__((weak)); - int main(int argc, char** argv) { - return configure_link_extern_weak_test == nullptr; - }] - ], - [ - ac_have_weak_symbols="yes" - AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], - [Define to 1 if the linker supports weak symbols.])]) +AC_CACHE_CHECK( + [for weak symbol support], + [folly_cv_prog_cc_weak_symbols], + [AC_LINK_IFELSE( + [AC_LANG_SOURCE[ + extern "C" void configure_link_extern_weak_test() __attribute__((weak)); + int main(int argc, char** argv) { + return configure_link_extern_weak_test == nullptr; + }]], + [folly_cv_prog_cc_weak_symbols="yes"], + [folly_cv_prog_cc_weak_symbols="no"])]) + +if test "$folly_cv_prog_cc_weak_symbols" = yes; then + AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], + [Define to 1 if the linker supports weak symbols.]) +fi AC_SEARCH_LIBS([cplus_demangle_v3_callback], [iberty_pic iberty]) if test "$ac_cv_search_cplus_demangle_v3_callback" != "no" ; then @@ -210,7 +295,8 @@ AC_SUBST([AM_LDFLAGS]) AM_CONDITIONAL([HAVE_STD_THREAD], [test "$ac_cv_header_features" = "yes"]) AM_CONDITIONAL([HAVE_X86_64], [test "$build_cpu" = "x86_64"]) AM_CONDITIONAL([HAVE_LINUX], [test "$build_os" == "linux-gnu"]) -AM_CONDITIONAL([HAVE_WEAK_SYMBOLS], [test "$ac_have_weak_symbols" = "yes"]) +AM_CONDITIONAL([HAVE_WEAK_SYMBOLS], + [test "$folly_cv_prog_cc_weak_symbols" = "yes"]) AM_CONDITIONAL([HAVE_BITS_FUNCTEXCEPT], [test "$ac_cv_header_bits_functexcept" = "yes"]) # Output diff --git a/folly/experimental/exception_tracer/ExceptionTracerBenchmark.cpp b/folly/experimental/exception_tracer/ExceptionTracerBenchmark.cpp index a9c80bf0..c04a3e5c 100644 --- a/folly/experimental/exception_tracer/ExceptionTracerBenchmark.cpp +++ b/folly/experimental/exception_tracer/ExceptionTracerBenchmark.cpp @@ -55,7 +55,7 @@ BENCHMARK(ExceptionTracer, iters) { } int main(int argc, char* argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); folly::runBenchmarks(); return 0; diff --git a/folly/experimental/io/HugePageUtil.cpp b/folly/experimental/io/HugePageUtil.cpp index b37bab1e..0dccb8ac 100644 --- a/folly/experimental/io/HugePageUtil.cpp +++ b/folly/experimental/io/HugePageUtil.cpp @@ -74,7 +74,7 @@ void list() { int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_cp) { if (argc != 3) usage(argv[0]); copy(argv[1], argv[2]); diff --git a/folly/experimental/symbolizer/ElfUtil.cpp b/folly/experimental/symbolizer/ElfUtil.cpp index 6f6003db..a49f661a 100644 --- a/folly/experimental/symbolizer/ElfUtil.cpp +++ b/folly/experimental/symbolizer/ElfUtil.cpp @@ -26,7 +26,7 @@ using namespace folly; using namespace folly::symbolizer; int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); CHECK_GE(argc, 2); ElfFile elf(argv[1]); diff --git a/folly/experimental/symbolizer/test/ElfTests.cpp b/folly/experimental/symbolizer/test/ElfTests.cpp index 258ad992..5350d4df 100644 --- a/folly/experimental/symbolizer/test/ElfTests.cpp +++ b/folly/experimental/symbolizer/test/ElfTests.cpp @@ -59,7 +59,7 @@ TEST_F(ElfTest, PointerValue) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); ElfTest::binaryPath = argv[0]; return RUN_ALL_TESTS(); } diff --git a/folly/experimental/symbolizer/test/StackTraceTest.cpp b/folly/experimental/symbolizer/test/StackTraceTest.cpp index 8123997a..601bb061 100644 --- a/folly/experimental/symbolizer/test/StackTraceTest.cpp +++ b/folly/experimental/symbolizer/test/StackTraceTest.cpp @@ -90,7 +90,7 @@ TEST(StackTraceTest, Signal) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/experimental/test/BitsBenchmark.cpp b/folly/experimental/test/BitsBenchmark.cpp index 454fddbd..08230eac 100644 --- a/folly/experimental/test/BitsBenchmark.cpp +++ b/folly/experimental/test/BitsBenchmark.cpp @@ -111,7 +111,7 @@ benchmarkGet(i64) 85.78% 8.53ns 117.16M #endif int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return sum.load(); } diff --git a/folly/experimental/test/BitsTest.cpp b/folly/experimental/test/BitsTest.cpp index 9ac5bc82..ba4d0ab9 100644 --- a/folly/experimental/test/BitsTest.cpp +++ b/folly/experimental/test/BitsTest.cpp @@ -310,7 +310,7 @@ TEST(Bits, ConcatenationAligned) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/experimental/test/EliasFanoCodingTest.cpp b/folly/experimental/test/EliasFanoCodingTest.cpp index 80192359..6e45e7b0 100644 --- a/folly/experimental/test/EliasFanoCodingTest.cpp +++ b/folly/experimental/test/EliasFanoCodingTest.cpp @@ -128,7 +128,7 @@ BENCHMARK(SkipTo1000_SkipQ128_1M) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (ret == 0 && FLAGS_benchmark) { diff --git a/folly/experimental/test/EventCountTest.cpp b/folly/experimental/test/EventCountTest.cpp index 077b4c71..1c65f5fc 100644 --- a/folly/experimental/test/EventCountTest.cpp +++ b/folly/experimental/test/EventCountTest.cpp @@ -127,7 +127,7 @@ TEST(EventCount, Simple) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret) { folly::runBenchmarksOnFlag(); diff --git a/folly/experimental/test/TestUtilTest.cpp b/folly/experimental/test/TestUtilTest.cpp index 8e458532..4bf29526 100644 --- a/folly/experimental/test/TestUtilTest.cpp +++ b/folly/experimental/test/TestUtilTest.cpp @@ -102,7 +102,7 @@ TEST(TemporaryDirectory, DeleteOnDestruction) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/gen/test/BaseBenchmark.cpp b/folly/gen/test/BaseBenchmark.cpp index 5ca1fbd9..6899eb31 100644 --- a/folly/gen/test/BaseBenchmark.cpp +++ b/folly/gen/test/BaseBenchmark.cpp @@ -338,7 +338,7 @@ BENCHMARK(Sample, iters) { // ============================================================================ int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/BaseTest.cpp b/folly/gen/test/BaseTest.cpp index be056b5b..7d34a21d 100644 --- a/folly/gen/test/BaseTest.cpp +++ b/folly/gen/test/BaseTest.cpp @@ -1029,6 +1029,6 @@ TEST(Gen, BatchMove) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/gen/test/CombineTest.cpp b/folly/gen/test/CombineTest.cpp index ba231e57..a28f45f1 100644 --- a/folly/gen/test/CombineTest.cpp +++ b/folly/gen/test/CombineTest.cpp @@ -162,6 +162,6 @@ TEST(CombineGen, TupleFlatten) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/gen/test/FileBenchmark.cpp b/folly/gen/test/FileBenchmark.cpp index 0f4f5b4c..61e7220e 100644 --- a/folly/gen/test/FileBenchmark.cpp +++ b/folly/gen/test/FileBenchmark.cpp @@ -64,7 +64,7 @@ BENCHMARK(ByLine_Pipes, iters) { // ============================================================================ int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/FileTest.cpp b/folly/gen/test/FileTest.cpp index 172c6f98..2e0a3a84 100644 --- a/folly/gen/test/FileTest.cpp +++ b/folly/gen/test/FileTest.cpp @@ -75,6 +75,6 @@ INSTANTIATE_TEST_CASE_P( ::testing::Values(0, 1, 2, 4, 8, 64, 4096)); int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/gen/test/ParallelBenchmark.cpp b/folly/gen/test/ParallelBenchmark.cpp index 886eb4e7..3d312906 100644 --- a/folly/gen/test/ParallelBenchmark.cpp +++ b/folly/gen/test/ParallelBenchmark.cpp @@ -173,7 +173,7 @@ seq(1, fibs) | parallel(map([](int) { return fi 1698.07% 87.96ms 11.37 ============================================================================ #endif int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/ParallelMapBenchmark.cpp b/folly/gen/test/ParallelMapBenchmark.cpp index 389269de..a0b466c2 100644 --- a/folly/gen/test/ParallelMapBenchmark.cpp +++ b/folly/gen/test/ParallelMapBenchmark.cpp @@ -85,7 +85,7 @@ BENCHMARK_RELATIVE(FibSumThreads, n) { */ int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/gen/test/ParallelMapTest.cpp b/folly/gen/test/ParallelMapTest.cpp index 15c0b454..d18064ad 100644 --- a/folly/gen/test/ParallelMapTest.cpp +++ b/folly/gen/test/ParallelMapTest.cpp @@ -140,6 +140,6 @@ TEST(Pmap, Rvalues) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/gen/test/ParallelTest.cpp b/folly/gen/test/ParallelTest.cpp index 585e325e..f40ab24a 100644 --- a/folly/gen/test/ParallelTest.cpp +++ b/folly/gen/test/ParallelTest.cpp @@ -104,6 +104,6 @@ TEST(ParallelTest, PSum) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/gen/test/StringBenchmark.cpp b/folly/gen/test/StringBenchmark.cpp index 7f2e2f0b..fcc20d12 100644 --- a/folly/gen/test/StringBenchmark.cpp +++ b/folly/gen/test/StringBenchmark.cpp @@ -322,7 +322,7 @@ BENCHMARK_RELATIVE(Records_VectorString, iters) { // ============================================================================ int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); initStringResplitterBenchmark(); runBenchmarks(); return 0; diff --git a/folly/gen/test/StringTest.cpp b/folly/gen/test/StringTest.cpp index 71acab88..96d61a00 100644 --- a/folly/gen/test/StringTest.cpp +++ b/folly/gen/test/StringTest.cpp @@ -304,6 +304,6 @@ TEST(StringGen, Unsplit) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/io/test/CompressionTest.cpp b/folly/io/test/CompressionTest.cpp index 4968f07e..42487012 100644 --- a/folly/io/test/CompressionTest.cpp +++ b/folly/io/test/CompressionTest.cpp @@ -247,7 +247,7 @@ INSTANTIATE_TEST_CASE_P( int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret) { diff --git a/folly/io/test/IOBufCursorTest.cpp b/folly/io/test/IOBufCursorTest.cpp index 824df93e..3ec3055e 100644 --- a/folly/io/test/IOBufCursorTest.cpp +++ b/folly/io/test/IOBufCursorTest.cpp @@ -643,7 +643,7 @@ BENCHMARK(skipBenchmark, iters) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); diff --git a/folly/io/test/IOBufQueueTest.cpp b/folly/io/test/IOBufQueueTest.cpp index 8e905171..e1051a1e 100644 --- a/folly/io/test/IOBufQueueTest.cpp +++ b/folly/io/test/IOBufQueueTest.cpp @@ -380,7 +380,7 @@ TEST(IOBufQueue, PopFirst) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/io/test/IOBufTest.cpp b/folly/io/test/IOBufTest.cpp index 283bee7d..71804bb5 100644 --- a/folly/io/test/IOBufTest.cpp +++ b/folly/io/test/IOBufTest.cpp @@ -1069,7 +1069,7 @@ TEST(IOBuf, HashAndEqual) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/io/test/NetworkBenchmark.cpp b/folly/io/test/NetworkBenchmark.cpp index 45077342..1178fc8c 100644 --- a/folly/io/test/NetworkBenchmark.cpp +++ b/folly/io/test/NetworkBenchmark.cpp @@ -150,7 +150,7 @@ chainBenchmark 100000 118.6 ms 1.186 us 823.2 k poolBenchmark 100000 32.2 ms 322 ns 2.962 M */ int main(int argc, char** argv) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); setNumbers(10, 10); folly::runBenchmarks(); diff --git a/folly/io/test/RecordIOTest.cpp b/folly/io/test/RecordIOTest.cpp index f4d20bad..a9d06244 100644 --- a/folly/io/test/RecordIOTest.cpp +++ b/folly/io/test/RecordIOTest.cpp @@ -267,6 +267,6 @@ TEST(RecordIOTest, Randomized) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/ArenaTest.cpp b/folly/test/ArenaTest.cpp index feda95ca..4d77e207 100644 --- a/folly/test/ArenaTest.cpp +++ b/folly/test/ArenaTest.cpp @@ -157,7 +157,7 @@ TEST(Arena, SizeLimit) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); return ret; } diff --git a/folly/test/AsciiCaseInsensitiveBenchmark.cpp b/folly/test/AsciiCaseInsensitiveBenchmark.cpp index 610dba67..20aee3f5 100644 --- a/folly/test/AsciiCaseInsensitiveBenchmark.cpp +++ b/folly/test/AsciiCaseInsensitiveBenchmark.cpp @@ -111,7 +111,7 @@ BENCHMARK(CurrentCaseInsensitiveCheck, iters) { } int main(int argc, char** argv) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); if (FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/AsciiCaseInsensitiveTest.cpp b/folly/test/AsciiCaseInsensitiveTest.cpp index 373998c4..3d00e50d 100644 --- a/folly/test/AsciiCaseInsensitiveTest.cpp +++ b/folly/test/AsciiCaseInsensitiveTest.cpp @@ -32,6 +32,6 @@ TEST(CaseInsensitiveMatch, CompareWithLegacy) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/AtomicBitSetTest.cpp b/folly/test/AtomicBitSetTest.cpp index 11032acd..3a0a0efc 100644 --- a/folly/test/AtomicBitSetTest.cpp +++ b/folly/test/AtomicBitSetTest.cpp @@ -56,7 +56,7 @@ TEST(AtomicBitSet, Simple) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/AtomicHashMapTest.cpp b/folly/test/AtomicHashMapTest.cpp index 449b5622..a91f571f 100644 --- a/folly/test/AtomicHashMapTest.cpp +++ b/folly/test/AtomicHashMapTest.cpp @@ -773,15 +773,15 @@ void benchmarkSetup() { string numIters = folly::to( std::min(1000000, int(FLAGS_numBMElements))); - google::SetCommandLineOptionWithMode( - "bm_max_iters", numIters.c_str(), google::SET_FLAG_IF_DEFAULT + gflags::SetCommandLineOptionWithMode( + "bm_max_iters", numIters.c_str(), gflags::SET_FLAG_IF_DEFAULT ); - google::SetCommandLineOptionWithMode( - "bm_min_iters", numIters.c_str(), google::SET_FLAG_IF_DEFAULT + gflags::SetCommandLineOptionWithMode( + "bm_min_iters", numIters.c_str(), gflags::SET_FLAG_IF_DEFAULT ); string numCoresStr = folly::to(numCores); - google::SetCommandLineOptionWithMode( - "numThreads", numCoresStr.c_str(), google::SET_FLAG_IF_DEFAULT + gflags::SetCommandLineOptionWithMode( + "numThreads", numCoresStr.c_str(), gflags::SET_FLAG_IF_DEFAULT ); std::cout << "\nRunning AHM benchmarks on machine with " << numCores @@ -793,7 +793,7 @@ void benchmarkSetup() { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret && FLAGS_benchmark) { benchmarkSetup(); diff --git a/folly/test/AtomicStructTest.cpp b/folly/test/AtomicStructTest.cpp index e142834c..43757a35 100644 --- a/folly/test/AtomicStructTest.cpp +++ b/folly/test/AtomicStructTest.cpp @@ -71,6 +71,6 @@ TEST(AtomicStruct, size_selection) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/BatonTest.cpp b/folly/test/BatonTest.cpp index e2c5cf13..ede45327 100644 --- a/folly/test/BatonTest.cpp +++ b/folly/test/BatonTest.cpp @@ -90,7 +90,7 @@ BENCHMARK(posix_sem_pingpong, iters) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto rv = RUN_ALL_TESTS(); if (!rv && FLAGS_benchmark) { diff --git a/folly/test/BenchmarkTest.cpp b/folly/test/BenchmarkTest.cpp index a039f02d..fed53ba1 100644 --- a/folly/test/BenchmarkTest.cpp +++ b/folly/test/BenchmarkTest.cpp @@ -129,7 +129,7 @@ BENCHMARK_PARAM_MULTI(paramMulti, 5); BENCHMARK_RELATIVE_PARAM_MULTI(paramMultiRel, 5); int main(int argc, char** argv) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); runBenchmarks(); runBenchmarksOnFlag(); } diff --git a/folly/test/BitIteratorTest.cpp b/folly/test/BitIteratorTest.cpp index 478cd6a8..002a19e0 100644 --- a/folly/test/BitIteratorTest.cpp +++ b/folly/test/BitIteratorTest.cpp @@ -178,7 +178,7 @@ runRealFFSTest 19 2.011 s 105.9 ms 9.447 int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret && FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/BitsTest.cpp b/folly/test/BitsTest.cpp index ba47aaf5..1bb9c172 100644 --- a/folly/test/BitsTest.cpp +++ b/folly/test/BitsTest.cpp @@ -164,7 +164,7 @@ TEST(Bits, popcount) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret && FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/CacheLocalityTest.cpp b/folly/test/CacheLocalityTest.cpp index 0b5322fe..b3f7207d 100644 --- a/folly/test/CacheLocalityTest.cpp +++ b/folly/test/CacheLocalityTest.cpp @@ -696,7 +696,7 @@ BENCHMARK_NAMED_PARAM(atomicIncrBaseline, local_incr_1000_work, 1000) int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret && FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/ChecksumTest.cpp b/folly/test/ChecksumTest.cpp index e563d3f9..316456cf 100644 --- a/folly/test/ChecksumTest.cpp +++ b/folly/test/ChecksumTest.cpp @@ -180,7 +180,7 @@ BENCHMARK(crc32c_software_512KB_block, iters) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); // Populate a buffer with a deterministic pattern // on which to compute checksums diff --git a/folly/test/ConcurrentSkipListBenchmark.cpp b/folly/test/ConcurrentSkipListBenchmark.cpp index 2fe52579..951079b5 100644 --- a/folly/test/ConcurrentSkipListBenchmark.cpp +++ b/folly/test/ConcurrentSkipListBenchmark.cpp @@ -599,7 +599,7 @@ BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); initData(); runBenchmarks(); diff --git a/folly/test/ConcurrentSkipListTest.cpp b/folly/test/ConcurrentSkipListTest.cpp index 02ce733b..f0139648 100644 --- a/folly/test/ConcurrentSkipListTest.cpp +++ b/folly/test/ConcurrentSkipListTest.cpp @@ -389,7 +389,7 @@ TEST(ConcurrentSkipList, ConcurrentAccess) { int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); google::InitGoogleLogging(argv[0]); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/ConvTest.cpp b/folly/test/ConvTest.cpp index f692af7b..e0416c35 100644 --- a/folly/test/ConvTest.cpp +++ b/folly/test/ConvTest.cpp @@ -1037,7 +1037,7 @@ DEFINE_BENCHMARK_GROUP(fbstring, 32768); int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret && FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/DeterministicScheduleTest.cpp b/folly/test/DeterministicScheduleTest.cpp index c01d449f..6ec429fb 100644 --- a/folly/test/DeterministicScheduleTest.cpp +++ b/folly/test/DeterministicScheduleTest.cpp @@ -53,6 +53,6 @@ TEST(DeterministicSchedule, uniformSubset) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/DynamicConverterTest.cpp b/folly/test/DynamicConverterTest.cpp index 5237cb6c..62417bb3 100644 --- a/folly/test/DynamicConverterTest.cpp +++ b/folly/test/DynamicConverterTest.cpp @@ -363,7 +363,7 @@ TEST(DynamicConverter, errors) { int main(int argc, char ** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_benchmark) { folly::runBenchmarks(); } diff --git a/folly/test/DynamicTest.cpp b/folly/test/DynamicTest.cpp index 1e3e25cc..6e1002cc 100644 --- a/folly/test/DynamicTest.cpp +++ b/folly/test/DynamicTest.cpp @@ -315,7 +315,7 @@ TEST(Dynamic, ArrayGenerator) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_benchmark) { folly::runBenchmarks(); } diff --git a/folly/test/ExceptionTest.cpp b/folly/test/ExceptionTest.cpp index 690a2b18..5bf586ac 100644 --- a/folly/test/ExceptionTest.cpp +++ b/folly/test/ExceptionTest.cpp @@ -91,7 +91,7 @@ TEST(ExceptionTest, Simple) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/ExceptionWrapperBenchmark.cpp b/folly/test/ExceptionWrapperBenchmark.cpp index ba412fe5..e7895198 100644 --- a/folly/test/ExceptionWrapperBenchmark.cpp +++ b/folly/test/ExceptionWrapperBenchmark.cpp @@ -210,7 +210,7 @@ BENCHMARK_RELATIVE(exception_wrapper_create_and_cast_concurrent, iters) { } int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/FBStringBenchmark.cpp b/folly/test/FBStringBenchmark.cpp index 359f1b46..9539effe 100644 --- a/folly/test/FBStringBenchmark.cpp +++ b/folly/test/FBStringBenchmark.cpp @@ -93,7 +93,7 @@ std::list RandomList(unsigned int maxSize) { #undef STRING int main(int argc, char** argv) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/FBStringTest.cpp b/folly/test/FBStringTest.cpp index 8133b016..65df20ba 100644 --- a/folly/test/FBStringTest.cpp +++ b/folly/test/FBStringTest.cpp @@ -1247,6 +1247,6 @@ TEST(FBString, moveTerminator) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/FBVectorBenchmark.cpp b/folly/test/FBVectorBenchmark.cpp index f498e7e8..2e20e39f 100644 --- a/folly/test/FBVectorBenchmark.cpp +++ b/folly/test/FBVectorBenchmark.cpp @@ -106,7 +106,7 @@ typedef fbvector FBStringFBVector; #undef VECTOR int main(int argc, char** argv) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/FBVectorTest.cpp b/folly/test/FBVectorTest.cpp index 919063e8..74d15054 100644 --- a/folly/test/FBVectorTest.cpp +++ b/folly/test/FBVectorTest.cpp @@ -276,6 +276,6 @@ TEST(FBVector, vector_of_maps) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/FileTestLockHelper.cpp b/folly/test/FileTestLockHelper.cpp index 44487eb9..62e4f7ec 100644 --- a/folly/test/FileTestLockHelper.cpp +++ b/folly/test/FileTestLockHelper.cpp @@ -23,7 +23,7 @@ DEFINE_bool(s, false, "get shared lock"); DEFINE_bool(x, false, "get exclusive lock"); int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); CHECK_EQ(FLAGS_s + FLAGS_x, 1) << "exactly one of -s and -x must be specified"; diff --git a/folly/test/FileUtilTest.cpp b/folly/test/FileUtilTest.cpp index 5e711a0c..698320c0 100644 --- a/folly/test/FileUtilTest.cpp +++ b/folly/test/FileUtilTest.cpp @@ -287,6 +287,6 @@ TEST(String, readFile) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/FingerprintTest.cpp b/folly/test/FingerprintTest.cpp index a4cc9142..42ebb3fc 100644 --- a/folly/test/FingerprintTest.cpp +++ b/folly/test/FingerprintTest.cpp @@ -165,7 +165,7 @@ TEST(Fingerprint, Alignment) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret) { folly::runBenchmarksOnFlag(); diff --git a/folly/test/FormatBenchmark.cpp b/folly/test/FormatBenchmark.cpp index 7acf893a..1760ce22 100644 --- a/folly/test/FormatBenchmark.cpp +++ b/folly/test/FormatBenchmark.cpp @@ -181,7 +181,7 @@ BENCHMARK_RELATIVE(format_nested_direct, iters) { // ============================================================================ int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); runBenchmarks(); return 0; } diff --git a/folly/test/FormatTest.cpp b/folly/test/FormatTest.cpp index e49e97ce..5e015e62 100644 --- a/folly/test/FormatTest.cpp +++ b/folly/test/FormatTest.cpp @@ -381,7 +381,7 @@ TEST(Format, BogusFormatString) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/FutexTest.cpp b/folly/test/FutexTest.cpp index 2669a3b9..eff4d14b 100644 --- a/folly/test/FutexTest.cpp +++ b/folly/test/FutexTest.cpp @@ -180,7 +180,7 @@ TEST(Futex, basic_deterministic) { int main(int argc, char ** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/HistogramBenchmark.cpp b/folly/test/HistogramBenchmark.cpp index 27b08258..a71de1e1 100644 --- a/folly/test/HistogramBenchmark.cpp +++ b/folly/test/HistogramBenchmark.cpp @@ -37,7 +37,7 @@ BENCHMARK_NAMED_PARAM(addValue, 0_to_1000, 10, 0, 1000); BENCHMARK_NAMED_PARAM(addValue, 5k_to_20k, 250, 5000, 20000); int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/IndexedMemPoolTest.cpp b/folly/test/IndexedMemPoolTest.cpp index 40f3dd13..b2b68292 100644 --- a/folly/test/IndexedMemPoolTest.cpp +++ b/folly/test/IndexedMemPoolTest.cpp @@ -157,6 +157,6 @@ TEST(IndexedMemPool, locate_elem) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/JsonTest.cpp b/folly/test/JsonTest.cpp index 0c2b6d5a..03bbcb4a 100644 --- a/folly/test/JsonTest.cpp +++ b/folly/test/JsonTest.cpp @@ -479,7 +479,7 @@ BENCHMARK(toJson, iters) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_benchmark) { folly::runBenchmarks(); } diff --git a/folly/test/LifoSemTests.cpp b/folly/test/LifoSemTests.cpp index 12ec0f2e..15ef5e02 100644 --- a/folly/test/LifoSemTests.cpp +++ b/folly/test/LifoSemTests.cpp @@ -430,7 +430,7 @@ BENCHMARK_NAMED_PARAM(contendedUse, 32_to_1000, 32, 1000) int main(int argc, char ** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); int rv = RUN_ALL_TESTS(); folly::runBenchmarksOnFlag(); return rv; diff --git a/folly/test/LoggingTest.cpp b/folly/test/LoggingTest.cpp index cb45d797..19d23418 100644 --- a/folly/test/LoggingTest.cpp +++ b/folly/test/LoggingTest.cpp @@ -71,7 +71,7 @@ BENCHMARK(dev_null_log_overhead, iter) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto rv = RUN_ALL_TESTS(); if (!rv && FLAGS_benchmark) { diff --git a/folly/test/MPMCPipelineTest.cpp b/folly/test/MPMCPipelineTest.cpp index f754eda8..6fd93be0 100644 --- a/folly/test/MPMCPipelineTest.cpp +++ b/folly/test/MPMCPipelineTest.cpp @@ -160,7 +160,7 @@ TEST(MPMCPipeline, MultiThreaded) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/MPMCQueueTest.cpp b/folly/test/MPMCQueueTest.cpp index 81dce263..e688d770 100644 --- a/folly/test/MPMCQueueTest.cpp +++ b/folly/test/MPMCQueueTest.cpp @@ -633,6 +633,6 @@ TEST(MPMCQueue, queue_moving) { int main(int argc, char ** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/MemoryIdlerTest.cpp b/folly/test/MemoryIdlerTest.cpp index 99630d94..3e5e6e28 100644 --- a/folly/test/MemoryIdlerTest.cpp +++ b/folly/test/MemoryIdlerTest.cpp @@ -198,7 +198,7 @@ BENCHMARK(releaseMallocTLS, iters) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto rv = RUN_ALL_TESTS(); if (!rv && FLAGS_benchmark) { diff --git a/folly/test/ProducerConsumerQueueBenchmark.cpp b/folly/test/ProducerConsumerQueueBenchmark.cpp index 84c9563c..73f6a324 100644 --- a/folly/test/ProducerConsumerQueueBenchmark.cpp +++ b/folly/test/ProducerConsumerQueueBenchmark.cpp @@ -232,7 +232,7 @@ BENCHMARK_PARAM(BM_ProducerConsumerLatency, 1048574); int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); runBenchmarks(); return 0; diff --git a/folly/test/RWSpinLockTest.cpp b/folly/test/RWSpinLockTest.cpp index 077c061a..1d88a434 100644 --- a/folly/test/RWSpinLockTest.cpp +++ b/folly/test/RWSpinLockTest.cpp @@ -237,6 +237,6 @@ TEST(RWSpinLock, concurrent_holder_test) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/RandomTest.cpp b/folly/test/RandomTest.cpp index 8653faf6..c11bf6f9 100644 --- a/folly/test/RandomTest.cpp +++ b/folly/test/RandomTest.cpp @@ -113,7 +113,7 @@ BENCHMARK(Random64OneIn) { doNotOptimizeAway(Random::oneIn(100)); } int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/RangeFindBenchmark.cpp b/folly/test/RangeFindBenchmark.cpp index b4bc5598..065e6a3f 100644 --- a/folly/test/RangeFindBenchmark.cpp +++ b/folly/test/RangeFindBenchmark.cpp @@ -337,7 +337,7 @@ BENCHMARK(FindFirstOfOffsetRange, n) { BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); for (int len : {1, 8, 10, 16, 32, 64, 128, 256, 10*1024, 1024*1024}) { initStr(len); diff --git a/folly/test/ScopeGuardTest.cpp b/folly/test/ScopeGuardTest.cpp index 285dd445..9eb345b5 100644 --- a/folly/test/ScopeGuardTest.cpp +++ b/folly/test/ScopeGuardTest.cpp @@ -293,6 +293,6 @@ TEST(ScopeGuard, TEST_SCOPE_SUCCESS_THROW) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } diff --git a/folly/test/StringTest.cpp b/folly/test/StringTest.cpp index c6da5306..0a1ac9e4 100644 --- a/folly/test/StringTest.cpp +++ b/folly/test/StringTest.cpp @@ -1114,7 +1114,7 @@ BENCHMARK(joinInt, iters) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret) { initBenchmark(); diff --git a/folly/test/SubprocessTestParentDeathHelper.cpp b/folly/test/SubprocessTestParentDeathHelper.cpp index e5db86d1..fd1d42ea 100644 --- a/folly/test/SubprocessTestParentDeathHelper.cpp +++ b/folly/test/SubprocessTestParentDeathHelper.cpp @@ -74,7 +74,7 @@ void runParent(const char* file) { } int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); CHECK_EQ(argc, 2); if (FLAGS_child) { runChild(argv[1]); diff --git a/folly/test/ThreadCachedArenaTest.cpp b/folly/test/ThreadCachedArenaTest.cpp index 8f89d8ad..1c68dfe2 100644 --- a/folly/test/ThreadCachedArenaTest.cpp +++ b/folly/test/ThreadCachedArenaTest.cpp @@ -256,7 +256,7 @@ BENCHMARK_DRAW_LINE() int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); auto ret = RUN_ALL_TESTS(); if (!ret && FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/ThreadCachedIntTest.cpp b/folly/test/ThreadCachedIntTest.cpp index 231763d5..9612b02b 100644 --- a/folly/test/ThreadCachedIntTest.cpp +++ b/folly/test/ThreadCachedIntTest.cpp @@ -239,9 +239,9 @@ BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); - google::SetCommandLineOptionWithMode( - "bm_min_usec", "10000", google::SET_FLAG_IF_DEFAULT + gflags::ParseCommandLineFlags(&argc, &argv, true); + gflags::SetCommandLineOptionWithMode( + "bm_min_usec", "10000", gflags::SET_FLAG_IF_DEFAULT ); if (FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/ThreadLocalTest.cpp b/folly/test/ThreadLocalTest.cpp index a5de4916..36917139 100644 --- a/folly/test/ThreadLocalTest.cpp +++ b/folly/test/ThreadLocalTest.cpp @@ -572,9 +572,9 @@ BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); - google::SetCommandLineOptionWithMode( - "bm_max_iters", "100000000", google::SET_FLAG_IF_DEFAULT + gflags::ParseCommandLineFlags(&argc, &argv, true); + gflags::SetCommandLineOptionWithMode( + "bm_max_iters", "100000000", gflags::SET_FLAG_IF_DEFAULT ); if (FLAGS_benchmark) { folly::runBenchmarks(); diff --git a/folly/test/TimeseriesBenchmark.cpp b/folly/test/TimeseriesBenchmark.cpp index 9ce8ba4a..236e47d9 100644 --- a/folly/test/TimeseriesBenchmark.cpp +++ b/folly/test/TimeseriesBenchmark.cpp @@ -71,7 +71,7 @@ BENCHMARK_NAMED_PARAM(addValue, 71x5_100perSec, seconds(71), 5, 100); BENCHMARK_NAMED_PARAM(addValue, 1x1_100perSec, seconds(1), 1, 100); int main(int argc, char *argv[]) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; } diff --git a/folly/test/TraitsTest.cpp b/folly/test/TraitsTest.cpp index 129ad83d..90a31d0f 100644 --- a/folly/test/TraitsTest.cpp +++ b/folly/test/TraitsTest.cpp @@ -120,7 +120,7 @@ TEST(Traits, is_complete) { int main(int argc, char ** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_benchmark) { folly::runBenchmarks(); } diff --git a/folly/test/VarintTest.cpp b/folly/test/VarintTest.cpp index 812b888b..59d1a7f2 100644 --- a/folly/test/VarintTest.cpp +++ b/folly/test/VarintTest.cpp @@ -172,7 +172,7 @@ BENCHMARK(VarintDecoding, iters) { int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); int ret = RUN_ALL_TESTS(); if (ret == 0) { diff --git a/folly/test/function_benchmark/main.cpp b/folly/test/function_benchmark/main.cpp index c2d03eca..13d8a67f 100644 --- a/folly/test/function_benchmark/main.cpp +++ b/folly/test/function_benchmark/main.cpp @@ -263,6 +263,6 @@ BENCHMARK(return_code_noexcept, iters) { // main() int main(int argc, char** argv) { - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); } diff --git a/folly/test/stl_tests/StlVectorTest.cpp b/folly/test/stl_tests/StlVectorTest.cpp index 5ad8b9da..6f68ec9e 100644 --- a/folly/test/stl_tests/StlVectorTest.cpp +++ b/folly/test/stl_tests/StlVectorTest.cpp @@ -2722,7 +2722,7 @@ STL_TEST("attach", attach, is_destructible, a) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } @@ -2737,7 +2737,7 @@ TEST(placeholder, gccversion) {} int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - google::ParseCommandLineFlags(&argc, &argv, true); + gflags::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } -- 2.34.1