Switch gflags to portability/GFlags.h
authorMichael Lee <mzlee@fb.com>
Thu, 5 May 2016 00:08:47 +0000 (17:08 -0700)
committerFacebook Github Bot 5 <facebook-github-bot-5-bot@fb.com>
Thu, 5 May 2016 00:20:24 +0000 (17:20 -0700)
Summary:
There are two places that still includes gflags/gflags.h:
portability/GFlags.h and futures/exercises/Koan.h. Also removing
gflags entirely from a couple of places which never reference it at
all.

Reviewed By: yfeldblum

Differential Revision: D3203187

fb-gh-sync-id: e7725fbf2c4b3c475c0035e1b0e8c6e1227f277f
fbshipit-source-id: e7725fbf2c4b3c475c0035e1b0e8c6e1227f277f

51 files changed:
folly/MemoryMapping.cpp
folly/build/GenerateFingerprintTables.cpp
folly/experimental/ProgramOptions.cpp
folly/experimental/ProgramOptions.h
folly/experimental/exception_tracer/ExceptionTracerBenchmark.cpp
folly/experimental/io/HugePageUtil.cpp
folly/experimental/symbolizer/ElfUtil.cpp
folly/experimental/symbolizer/test/DwarfBenchmark.cpp
folly/experimental/test/LockFreeRingBufferTest.cpp
folly/experimental/test/NestedCommandLineAppTestHelper.cpp
folly/experimental/test/ReadMostlySharedPtrBenchmark.cpp
folly/experimental/test/StringKeyedTest.cpp
folly/init/Init.cpp
folly/io/async/test/EventBaseBenchmark.cpp
folly/io/test/IOBufQueueTest.cpp
folly/io/test/IOBufTest.cpp
folly/io/test/NetworkBenchmark.cpp
folly/io/test/RecordIOTest.cpp
folly/portability/GFlags.h
folly/test/AsciiCaseInsensitiveTest.cpp
folly/test/AtomicUnorderedMapTest.cpp
folly/test/BatonBenchmark.cpp
folly/test/BitIteratorTest.cpp
folly/test/ChecksumTest.cpp
folly/test/ConcurrentSkipListBenchmark.cpp
folly/test/ConcurrentSkipListTest.cpp
folly/test/DeterministicScheduleTest.cpp
folly/test/DynamicOtherTest.cpp
folly/test/ExceptionWrapperBenchmark.cpp
folly/test/FBStringBenchmark.cpp
folly/test/FBVectorBenchmark.cpp
folly/test/FileLockTest.cpp
folly/test/FileTestLockHelper.cpp
folly/test/FormatOtherTest.cpp
folly/test/HashBenchmark.cpp
folly/test/HistogramBenchmark.cpp
folly/test/HistogramTest.cpp
folly/test/JsonOtherTest.cpp
folly/test/LifoSemTests.cpp
folly/test/ProducerConsumerQueueBenchmark.cpp
folly/test/ProducerConsumerQueueTest.cpp
folly/test/RWSpinLockTest.cpp
folly/test/SharedMutexTest.cpp
folly/test/SingletonBenchmark.cpp
folly/test/SparseByteSetBench.cpp
folly/test/SparseByteSetTest.cpp
folly/test/SubprocessTestParentDeathHelper.cpp
folly/test/ThreadCachedIntTest.cpp
folly/test/ThreadLocalBenchmark.cpp
folly/test/function_benchmark/main.cpp
folly/test/stl_tests/StlVectorTest.cpp

index 17f1e760a968f15f22af9c35ba2714f7d249755d..f6c3be9cccb94a3dc0ae7133b7d9ec408d08f701 100644 (file)
@@ -21,6 +21,7 @@
 #include <utility>
 
 #include <folly/Format.h>
+#include <folly/portability/GFlags.h>
 #include <folly/portability/SysMman.h>
 
 #ifdef __linux__
@@ -30,7 +31,6 @@
 #include <fcntl.h>
 #include <sys/types.h>
 #include <system_error>
-#include <gflags/gflags.h>
 
 DEFINE_int64(mlock_chunk_size, 1 << 20,  // 1MB
              "Maximum bytes to mlock/munlock/munmap at once "
index e0fcc0e4e4005fe86edffee7fbb7ec14e514be7e..3ab74acbc27be7c3f98cc091f9e9737492e1dc07 100644 (file)
@@ -24,9 +24,9 @@
 #include <string>
 
 #include <glog/logging.h>
-#include <gflags/gflags.h>
 
 #include <folly/Format.h>
+#include <folly/portability/GFlags.h>
 
 #include <folly/detail/FingerprintPolynomial.h>
 
index d3bf83697e04f39c058768f965fa08ed4af5b617..9e988514a4736a197b567c95e136a51c244f9b4e 100644 (file)
 #include <unordered_set>
 
 #include <boost/version.hpp>
-#include <gflags/gflags.h>
 #include <glog/logging.h>
+
 #include <folly/Conv.h>
 #include <folly/Portability.h>
+#include <folly/portability/GFlags.h>
 
 namespace po = ::boost::program_options;
 
index b51b98998771e28a0131d234c04445d64d62ca59..f128ed7ae5759ecf2694ed827dddd7c9151ae696 100644 (file)
@@ -17,8 +17,9 @@
 #pragma once
 
 #include <boost/program_options.hpp>
+
 #include <folly/Optional.h>
-#include <gflags/gflags.h>
+#include <folly/portability/GFlags.h>
 
 namespace folly {
 
index 61ad1af94ca99c0cdbc74cf6b15af67485a62a17..dd4a04b6934117e33bbe752a6d74f417a76b3762 100644 (file)
 #include <thread>
 #include <vector>
 
-#include <gflags/gflags.h>
 #include <glog/logging.h>
 
 #include <folly/Benchmark.h>
 #include <folly/experimental/exception_tracer/ExceptionTracer.h>
+#include <folly/portability/GFlags.h>
 
 void recurse(int level) {
   if (level == 0) {
index d3ba4b5245eac37217f23f396114e4013dc067d4..0eea9252f9eb46a83581bec73120005449b255ff 100644 (file)
@@ -25,8 +25,6 @@
 #include <stdexcept>
 #include <system_error>
 
-#include <gflags/gflags.h>
-
 #include <folly/File.h>
 #include <folly/Format.h>
 #include <folly/MemoryMapping.h>
@@ -34,6 +32,7 @@
 #include <folly/Range.h>
 #include <folly/ScopeGuard.h>
 #include <folly/experimental/io/HugePages.h>
+#include <folly/portability/GFlags.h>
 
 DEFINE_bool(cp, false, "Copy file");
 
index 03285ab44653dc26ae50781cecc6d2f321b05e0b..41ca585efb8eda1293a4a1d1e9fefdbffdb23cd6 100644 (file)
 
 #include <stdio.h>
 
-#include <gflags/gflags.h>
 #include <glog/logging.h>
 
+#include <folly/portability/GFlags.h>
+
 using namespace folly;
 using namespace folly::symbolizer;
 
index 96c352f9bf6cff7b84cd984e191410ef8924829a..877b58118014fbc40851761f4da0707860d79bfc 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <folly/Benchmark.h>
 #include <folly/experimental/symbolizer/Dwarf.h>
-#include <gflags/gflags.h>
+#include <folly/portability/GFlags.h>
 
 void dummy() {}
 
index a25cdaa594139ec86803e1512160fb39f88520c3..14b373d28f54d390b2f58255705243ab4ee0b0eb 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include <gflags/gflags.h>
 #include <gtest/gtest.h>
 #include <iostream>
 #include <thread>
index a5dffbc498a744722fc9d6ba058908108f4f6ecd..e2dffec38df64ae2f5750ac9d0821a493529d036 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include <folly/experimental/NestedCommandLineApp.h>
-#include <gflags/gflags.h>
+#include <folly/portability/GFlags.h>
 
 DEFINE_int32(global_foo, 42, "Global foo");
 
index a9d827fcacb4b2588586ea64176fcadad8910639..7901056db144cdb1bee06856e2d183f2669bec2e 100644 (file)
  */
 /* -*- Mode: C++; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
 
-#include <thread>
+#include <folly/experimental/ReadMostlySharedPtr.h>
+
 #include <iostream>
+#include <thread>
+
 #include <folly/Benchmark.h>
 #include <folly/Memory.h>
-#include <gflags/gflags.h>
-
 #include <folly/experimental/RCURefCount.h>
-#include <folly/experimental/ReadMostlySharedPtr.h>
+#include <folly/portability/GFlags.h>
 
 template <template<typename> class MainPtr,
           template<typename> class WeakPtr,
index 6a790eb736454af5961763405647ccc9c3184546..dd05d0a3e6a89a3a3989e68a41a566181e880417 100644 (file)
  */
 // Copyright 2013-present Facebook. All Rights Reserved.
 
-#include <gflags/gflags.h>
-#include <glog/logging.h>
-#include <gtest/gtest.h>
-
-#include <string>
-#include <list>
-
-#include <folly/Range.h>
 #include <folly/experimental/StringKeyedMap.h>
 #include <folly/experimental/StringKeyedSet.h>
 #include <folly/experimental/StringKeyedUnorderedMap.h>
 #include <folly/experimental/StringKeyedUnorderedSet.h>
 
+#include <list>
+#include <string>
+
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
+#include <folly/Range.h>
+#include <folly/portability/GFlags.h>
+
 using folly::StringKeyedMap;
 using folly::StringKeyedSetBase;
 using folly::StringKeyedUnorderedMap;
index 46d30a08750c3cf5bc945339e14678a8a43845c7..5b07a9e9687dc851f714f441c54dc9d98030acb5 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include <folly/init/Init.h>
-#include <folly/Singleton.h>
-#include <folly/experimental/symbolizer/SignalHandler.h>
 
 #include <glog/logging.h>
-#include <gflags/gflags.h>
+
+#include <folly/Singleton.h>
+#include <folly/experimental/symbolizer/SignalHandler.h>
+#include <folly/portability/GFlags.h>
 
 namespace folly {
 
index 6ab39689d368c46dbbfed4483df70ccf28888d00..a2cc774528f1b7823eb575286f1b3bcdb869d4f3 100644 (file)
@@ -16,8 +16,7 @@
 
 #include <folly/Benchmark.h>
 #include <folly/io/async/EventBase.h>
-
-#include <gflags/gflags.h>
+#include <folly/portability/GFlags.h>
 
 using namespace folly;
 
index 59066228c15b76993ea302e7c1896a605b0538fd..8ba3d7b47c85aca0c8b4aed192ad7d6fd1333478 100644 (file)
  */
 
 #include <folly/io/IOBufQueue.h>
-#include <folly/Range.h>
-
-#include <gflags/gflags.h>
-#include <gtest/gtest.h>
 
 #include <iostream>
 #include <stdexcept>
 #include <string.h>
 
+#include <gtest/gtest.h>
+
+#include <folly/Range.h>
+
 using folly::IOBuf;
 using folly::IOBufQueue;
 using folly::StringPiece;
index 7267b49c627f61869296eb82087f98c12f78be39..c283db0518f9c5d4f1aa4e5ecf057e5f7cdf0574 100644 (file)
 #include <folly/io/IOBuf.h>
 #include <folly/io/TypedIOBuf.h>
 
-#include <gflags/gflags.h>
+#include <cstddef>
+
 #include <boost/random.hpp>
 #include <gtest/gtest.h>
 
 #include <folly/Malloc.h>
 #include <folly/Range.h>
 
-#include <cstddef>
-
 using folly::fbstring;
 using folly::fbvector;
 using folly::IOBuf;
index 83525a37bb8692dd495507d6b66b4712704b46c8..45c265f930fe24e8083de8c50792a5dd4f82ea49 100644 (file)
  * limitations under the License.
  */
 
-#include <folly/io/IOBuf.h>
+#include <vector>
 
-#include <gflags/gflags.h>
 #include <folly/Benchmark.h>
 #include <folly/io/Cursor.h>
-
-#include <vector>
+#include <folly/io/IOBuf.h>
+#include <folly/portability/GFlags.h>
 
 using folly::IOBuf;
 using std::unique_ptr;
index 3025d28005c93a667b8d8e91af3646415eaf503d..e18fd2625abcaac508171c7e2d273c2d02baa09e 100644 (file)
 
 #include <sys/types.h>
 #include <unistd.h>
-
 #include <random>
 
-#include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <gtest/gtest.h>
 
@@ -30,6 +28,7 @@
 #include <folly/Random.h>
 #include <folly/experimental/TestUtil.h>
 #include <folly/io/IOBufQueue.h>
+#include <folly/portability/GFlags.h>
 
 DEFINE_int32(random_seed, folly::randomNumberSeed(), "random seed");
 
index 6f0b1d51819759f5dfd72192355d161ccc575269..87739bb9e75a2433fdf6a0875276fed1dc10edb2 100644 (file)
@@ -16,9 +16,9 @@
 
 #pragma once
 
-#if FOLLY_HAVE_LIBGFLAGS
-#include <gflags/gflags.h>
-#else
+#include <folly/portability/Config.h>
+
+#if defined(FOLLY_HAVE_LIBGFLAGS) && (FOLLY_HAVE_LIBGFLAGS == 0)
 // glog/logging.h is dependent on this implementation detail
 // being defined otherwise it undefines all of this -_-....
 //
@@ -58,4 +58,6 @@
   FOLLY_DEFINE_FLAG(unsigned long long, U64, _name, _default)
 #define DEFINE_string(_name, _default, _description) \
   FOLLY_DEFINE_FLAG(std::string, S, _name, _default)
+#else
+#include <gflags/gflags.h>
 #endif
index cd05ba288596639488071f97880f129044a6d098..ec7f078fde40be1ec384b8913c3c7c90316c9a8f 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <folly/Range.h>
 
-#include <gflags/gflags.h>
+#include <folly/portability/GFlags.h>
 #include <gtest/gtest.h>
 #include <algorithm>
 
index 29287e592a00376a803583a626a60ad6a8e11012..d90f126c465d37b0126f7a31aa304dadb789d490 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include <folly/AtomicUnorderedMap.h>
-#include <folly/test/DeterministicSchedule.h>
-#include <thread>
+
 #include <semaphore.h>
-#include <gflags/gflags.h>
+#include <thread>
+#include <unordered_map>
+
 #include <gtest/gtest.h>
+
 #include <folly/Benchmark.h>
-#include <unordered_map>
+#include <folly/portability/GFlags.h>
+#include <folly/test/DeterministicSchedule.h>
 
 using namespace folly;
 using namespace folly::test;
index b9c86462860d49a53ecf20bd850c1b5f09b41873..099226a86a90a046e4c60e727aa69819439886bd 100644 (file)
  */
 
 #include <folly/Baton.h>
+
+#include <semaphore.h>
+#include <thread>
+
+#include <gtest/gtest.h>
+
 #include <folly/Benchmark.h>
+#include <folly/portability/GFlags.h>
 #include <folly/test/BatonTestHelpers.h>
 #include <folly/test/DeterministicSchedule.h>
-#include <thread>
-#include <semaphore.h>
-#include <gflags/gflags.h>
-#include <gtest/gtest.h>
 
 using namespace folly;
 using namespace folly::test;
index d60db6743165a2821df54ace39d018db02ee6bd5..fdf49b219c62f260090f4819565d02be8550fe7e 100644 (file)
  */
 
 #include <folly/Bits.h>
-#include <folly/Benchmark.h>
 
 #include <algorithm>
 #include <type_traits>
 #include <limits>
 #include <vector>
+
 #include <gtest/gtest.h>
 
-#include <gflags/gflags.h>
+#include <folly/Benchmark.h>
+#include <folly/portability/GFlags.h>
 
 using namespace folly;
 using namespace folly::bititerator_detail;
index 8b637dd67c4210f955c16c106373b284d3f4b7d0..a82bf75e88757e68c0d23e495db1c4db86d8a739 100644 (file)
  */
 
 #include <folly/Checksum.h>
-#include <gflags/gflags.h>
+
 #include <gtest/gtest.h>
+
 #include <folly/Benchmark.h>
 #include <folly/Hash.h>
 #include <folly/detail/ChecksumDetail.h>
+#include <folly/portability/GFlags.h>
 
 namespace {
 const unsigned int BUFFER_SIZE = 512 * 1024 * sizeof(uint64_t);
index 61fcae25187a2a5d01aa026fa42bb5d8b58e65b9..d1884a4a5795e0c954c50e4227637dc3491fc2aa 100644 (file)
 #include <set>
 #include <thread>
 
-#include <gflags/gflags.h>
-#include <glog/logging.h>
 #include <folly/Benchmark.h>
 #include <folly/ConcurrentSkipList.h>
 #include <folly/Hash.h>
 #include <folly/RWSpinLock.h>
-
+#include <folly/portability/GFlags.h>
+#include <glog/logging.h>
 
 DEFINE_int32(num_threads, 12, "num concurrent threads to test");
 
index 0a01d8f216231fab1e7714207f93c96763b95669..b63be004181fdb560ea458f2a578755ba1d2508c 100644 (file)
@@ -16,6 +16,8 @@
 
 // @author: Xin Liu <xliux@fb.com>
 
+#include <folly/ConcurrentSkipList.h>
+
 #include <atomic>
 #include <memory>
 #include <set>
 #include <system_error>
 
 #include <glog/logging.h>
-#include <gflags/gflags.h>
+#include <gtest/gtest.h>
 
 #include <folly/Arena.h>
-#include <folly/ConcurrentSkipList.h>
 #include <folly/Foreach.h>
 #include <folly/Memory.h>
 #include <folly/String.h>
-
-#include <gtest/gtest.h>
+#include <folly/portability/GFlags.h>
 
 DEFINE_int32(num_threads, 12, "num concurrent threads to test");
 
index 5ec300b43f006c296e3b1ab49702d6f7a43617f3..ceca71e383f8f0e0834ab52e78e318577c15a747 100644 (file)
 
 #include <folly/test/DeterministicSchedule.h>
 
-#include <gflags/gflags.h>
 #include <gtest/gtest.h>
 
+#include <folly/portability/GFlags.h>
+
 using namespace folly::test;
 
 TEST(DeterministicSchedule, uniform) {
index 5d533b4a0ee5dd2a210d330ba0256eb48328bc7f..bf3b462f32ce516ce3ef68d3b973f3f862520519 100644 (file)
@@ -18,8 +18,8 @@
 
 #include <folly/gen/Base.h>
 #include <folly/json.h>
+#include <folly/portability/GFlags.h>
 
-#include <gflags/gflags.h>
 #include <gtest/gtest.h>
 
 #include <iostream>
index 2448324c13d5f08619e3a2aec08d85d2fbfebcbf..fbd72820c4cdce9010657462c114fb673bcd477d 100644 (file)
  */
 #include <folly/ExceptionWrapper.h>
 
-#include <gflags/gflags.h>
 #include <atomic>
 #include <exception>
-#include <vector>
 #include <stdexcept>
 #include <thread>
+#include <vector>
 
 #include <folly/Benchmark.h>
+#include <folly/portability/GFlags.h>
 
 DEFINE_int32(num_threads, 32, "Number of threads to run concurrency "
                               "benchmarks");
index e6d8a8e5e3fe5aec9d13d7cd035856176f3d57f9..086c8ae5101c36f851a18f839996ab9384a0adcb 100644 (file)
 #include <folly/FBString.h>
 
 #include <cstdlib>
-
 #include <list>
 #include <fstream>
 #include <sstream>
+
 #include <boost/algorithm/string.hpp>
 #include <boost/random.hpp>
 
-#include <gflags/gflags.h>
-
+#include <folly/Benchmark.h>
 #include <folly/Foreach.h>
 #include <folly/Random.h>
-#include <folly/Benchmark.h>
+#include <folly/portability/GFlags.h>
 
 using namespace std;
 using namespace folly;
index cda23e900d28179dd797d9eafce2ecfdc04e37bd..0b676912be3b4304d33bac6e4610bf273fdcd541 100644 (file)
 //
 // Author: andrei.alexandrescu@fb.com
 
-#include <folly/Foreach.h>
-#include <folly/Traits.h>
-#include <folly/Random.h>
+#include <folly/Benchmark.h>
 #include <folly/FBString.h>
 #include <folly/FBVector.h>
-#include <folly/Benchmark.h>
-
-#include <gflags/gflags.h>
+#include <folly/Foreach.h>
+#include <folly/Random.h>
+#include <folly/Traits.h>
+#include <folly/portability/GFlags.h>
 
 #include <gtest/gtest.h>
 #include <list>
index 56d4ef7ff8825f910be51b9b1a83154d2bed52e1..8001e594b920c2da644555ae4b35b4d81f799294 100644 (file)
 
 #include <folly/File.h>
 
+#include <mutex>
+
+#include <glog/logging.h>
+#include <gtest/gtest.h>
 #include <boost/thread/locks.hpp>
 
 #include <folly/String.h>
 #include <folly/Subprocess.h>
-#include <folly/experimental/io/FsUtil.h>
 #include <folly/experimental/TestUtil.h>
-
-#include <gflags/gflags.h>
-#include <glog/logging.h>
-#include <gtest/gtest.h>
-
-#include <mutex>
+#include <folly/experimental/io/FsUtil.h>
+#include <folly/portability/GFlags.h>
 
 using namespace folly;
 using namespace folly::test;
index 1067d31fa0169f1461a969c309db8241d62758ce..781979ea04efded6107c31dc35c82d1d0a031bd9 100644 (file)
  * limitations under the License.
  */
 
-#include <gflags/gflags.h>
 #include <glog/logging.h>
 
 #include <folly/File.h>
+#include <folly/portability/GFlags.h>
 
 DEFINE_bool(s, false, "get shared lock");
 DEFINE_bool(x, false, "get exclusive lock");
index 60733f90d087b40393dcad0023ba9986d53754d3..951321665dd2f213695f341d16bbc249d7cce022 100644 (file)
 
 #include <folly/Format.h>
 
+#include <glog/logging.h>
+#include <gtest/gtest.h>
+
 #include <folly/FBVector.h>
 #include <folly/FileUtil.h>
 #include <folly/dynamic.h>
 #include <folly/json.h>
 #include <folly/small_vector.h>
 
-#include <glog/logging.h>
-#include <gflags/gflags.h>
-#include <gtest/gtest.h>
-
 using namespace folly;
 
 TEST(FormatOther, file) {
index 7d5b075ca3708e1f6d203106e7cdc2444ef0663d..eaf06e78dc4f3c80d2160ef785cd500ebbcfa66f 100644 (file)
  * limitations under the License.
  */
 
-#include <stdint.h>
+#include <folly/Hash.h>
 
+#include <stdint.h>
 #include <deque>
 #include <random>
 #include <string>
 #include <vector>
 
+#include <glog/logging.h>
+
 #include <folly/Benchmark.h>
 #include <folly/Format.h>
-#include <folly/Hash.h>
 #include <folly/Preprocessor.h>
-#include <gflags/gflags.h>
-#include <glog/logging.h>
+#include <folly/portability/GFlags.h>
 
 namespace detail {
 
index 541d5ced182bbebb00765330c91775ba96710fd2..6f74fcf45ed6b47a87c6fabb442f0d156a526e0f 100644 (file)
  */
 #include <folly/stats/Histogram.h>
 
-#include <gflags/gflags.h>
-
 #include <folly/Benchmark.h>
 #include <folly/Foreach.h>
+#include <folly/portability/GFlags.h>
 
 using folly::Histogram;
 
index 143dea6e745d4b53670cae240ecb1a1ae7d794cf..680d8c0cb4e537b05b6707ab2c0cda4104a1d34f 100644 (file)
@@ -17,7 +17,6 @@
 #include <folly/stats/Histogram.h>
 #include <folly/stats/Histogram-defs.h>
 
-#include <gflags/gflags.h>
 #include <gtest/gtest.h>
 
 using folly::Histogram;
index efdacee9ec9424485b4726c9459613d1db917b39..01fd4cff1aae5bb028c2a8ed1b4b3b5043a0d9db 100644 (file)
@@ -18,9 +18,9 @@
 
 #include <folly/Benchmark.h>
 #include <folly/FileUtil.h>
+#include <folly/portability/GFlags.h>
 
 #include <gtest/gtest.h>
-#include <gflags/gflags.h>
 
 using folly::dynamic;
 using folly::parseJson;
index 4396ffa4d78ed90113398a5eb32e04963cdc485e..71889c402b739511ce682b658bcc5f8bd1c990fb 100644 (file)
  */
 
 #include <folly/LifoSem.h>
-#include <folly/test/DeterministicSchedule.h>
 
-#include <thread>
 #include <semaphore.h>
-#include <gflags/gflags.h>
+#include <thread>
+
 #include <gtest/gtest.h>
 
 #include <folly/Benchmark.h>
 #include <folly/Random.h>
+#include <folly/portability/GFlags.h>
+#include <folly/test/DeterministicSchedule.h>
 
 using namespace folly;
 using namespace folly::test;
index 2a954d4effed18763cdb1e29872aea9d25d9b051..068dfc0661e3d28ec40c9296ad4c75b8224b2cdf 100644 (file)
 #include <stdio.h>
 #include <pthread.h>
 
-#include <gflags/gflags.h>
-#include <glog/logging.h>
 #include <folly/Benchmark.h>
+#include <folly/ProducerConsumerQueue.h>
+#include <folly/portability/GFlags.h>
 #include <folly/stats/Histogram.h>
 #include <folly/stats/Histogram-defs.h>
-#include <folly/ProducerConsumerQueue.h>
+#include <glog/logging.h>
 
 namespace {
 
index d358035afd4ec81ae0844b91efbfed2088af84b5..bd1fa0c377d9ad0d2ce161da50217ef4de120700 100644 (file)
 
 #include <folly/ProducerConsumerQueue.h>
 
-#include <gtest/gtest.h>
-#include <vector>
 #include <atomic>
 #include <chrono>
 #include <memory>
 #include <thread>
+#include <vector>
+
 #include <glog/logging.h>
+#include <gtest/gtest.h>
 
 //////////////////////////////////////////////////////////////////////
 
index b3df02260142d90f985d3708274a1e9e76486997..18011e1ab80e763617665de383a2c8182ca31659 100644 (file)
 // @author xliu (xliux@fb.com)
 //
 
+#include <folly/RWSpinLock.h>
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <vector>
 #include <thread>
 
-#include <gtest/gtest.h>
 #include <glog/logging.h>
-#include <folly/RWSpinLock.h>
+#include <gtest/gtest.h>
+
+#include <folly/portability/GFlags.h>
 
-#if FOLLY_HAVE_LIBGFLAGS
-#include <gflags/gflags.h>
 DEFINE_int32(num_threads, 8, "num threads");
-#else
-constexpr int FLAGS_num_threads = 8;
-#endif
 
 namespace {
 
index 70661b5e6fa965af87846ed2a354d83e8d9cbcbf..8672e665d1ba54412c4c8547e84d37f8824d9b12 100644 (file)
 #include <stdlib.h>
 #include <thread>
 #include <vector>
+
+#include <gtest/gtest.h>
 #include <boost/optional.hpp>
+#include <boost/thread/shared_mutex.hpp>
+
 #include <folly/Benchmark.h>
 #include <folly/MPMCQueue.h>
+#include <folly/RWSpinLock.h>
 #include <folly/Random.h>
+#include <folly/portability/GFlags.h>
 #include <folly/test/DeterministicSchedule.h>
-#include <gflags/gflags.h>
-#include <gtest/gtest.h>
-
-#include <boost/thread/shared_mutex.hpp>
-#include <folly/RWSpinLock.h>
 
 using namespace folly;
 using namespace folly::test;
index 11d00d2a268e4c7699e8f680e51b304911fe1cd4..5fa38e4bff7f0a2f14fedf0a5fc0e53ed55e6daf 100644 (file)
  */
 /* -*- Mode: C++; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
 
-#include <thread>
+#include <folly/Singleton.h>
+
 #include <iostream>
+#include <thread>
+
 #include <folly/Benchmark.h>
 #include <folly/Memory.h>
-#include <gflags/gflags.h>
-
-#include <folly/Singleton.h>
+#include <folly/portability/GFlags.h>
 
 using namespace folly;
 
index 0f3da472501ee3d04133907e8a2cfa08838db198..83c6edd80e61100abd81578b7ab15e63425270a9 100644 (file)
  *  A benchmark comparing SparseByteSet to bitset<256> and bool[256].
  */
 
-#include <bitset>
-#include <random>
-#include <vector>
-#include <gflags/gflags.h>
 #include <folly/Benchmark.h>
 #include <folly/Format.h>
 #include <folly/SparseByteSet.h>
+#include <folly/portability/GFlags.h>
+#include <bitset>
+#include <random>
+#include <vector>
 
 using namespace std;
 using namespace folly;
index bf92d13fb5e1357a35e564da5217767f9f8e0525..f5f6f1a1103730dff6f69eef41a0abc88290e4da 100644 (file)
  * limitations under the License.
  */
 
+#include <folly/SparseByteSet.h>
+
 #include <cstdint>
 #include <limits>
 #include <random>
 #include <set>
-#include <folly/SparseByteSet.h>
+
 #include <gtest/gtest.h>
 
 using namespace std;
index 3aef378b9a7a1b98fd52b2ebb07b4051035a9d50..7ade0795c9445acda4dbea711210bd900619e723 100644 (file)
 #include <signal.h>
 #include <unistd.h>
 
-#include <gflags/gflags.h>
 #include <glog/logging.h>
 
 #include <folly/Conv.h>
 #include <folly/Subprocess.h>
+#include <folly/portability/GFlags.h>
 
 using folly::Subprocess;
 
index a3d13101ce49747873e8559bf282c38f4b7e6f66..4f5c377e097933b34233b888a3a49738917425c5 100644 (file)
  */
 
 #include <folly/ThreadCachedInt.h>
-#include <folly/Hash.h>
 
 #include <atomic>
 #include <thread>
-#include <gtest/gtest.h>
-#include <gflags/gflags.h>
+
 #include <glog/logging.h>
+#include <gtest/gtest.h>
+
 #include <folly/Benchmark.h>
+#include <folly/Hash.h>
+#include <folly/portability/GFlags.h>
 
 using namespace folly;
 
index dfaec0b0b387f1c4e388ee497249b5952876f0e6..6009cc6a955b375858651a5da141e3d9340ea6d1 100644 (file)
 #include <unordered_map>
 
 #include <boost/thread/tss.hpp>
-#include <gflags/gflags.h>
 #include <glog/logging.h>
 
 #include <folly/Benchmark.h>
 #include <folly/experimental/io/FsUtil.h>
+#include <folly/portability/GFlags.h>
 
 using namespace folly;
 
index 4fa63e08d3b40516bd10e904129377646e6f6d11..58ddcd0aa11b6cd41b11b7fbb9dcd8e160170d55 100644 (file)
 #include <folly/test/function_benchmark/benchmark_impl.h>
 #include <folly/test/function_benchmark/test_functions.h>
 
+#include <glog/logging.h>
+
 #include <folly/Benchmark.h>
 #include <folly/ScopeGuard.h>
-#include <gflags/gflags.h>
-#include <glog/logging.h>
+#include <folly/portability/GFlags.h>
 
 using folly::ScopeGuard;
 using folly::makeGuard;
index 1b3d616469ae689c26b0e1c17b82246485266cc4..a9c394922a8d178a837b27da78febf6220756bb0 100644 (file)
@@ -184,12 +184,13 @@ THOUGHTS:
 #include <cstddef>
 #include <iomanip>
 
-#include <folly/ScopeGuard.h>
-#include <folly/Conv.h>
-#include <boost/preprocessor.hpp>
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <gflags/gflags.h>
 #include <gtest/gtest.h>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/preprocessor.hpp>
+
+#include <folly/Conv.h>
+#include <folly/ScopeGuard.h>
+#include <folly/portability/GFlags.h>
 
 using namespace std;
 using namespace folly;