2017
[folly.git] / folly / portability / GFlags.h
index 6f0b1d51819759f5dfd72192355d161ccc575269..48bd125da73655fe1cd5b478c71369f7cf68c26b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,9 +16,9 @@
 
 #pragma once
 
-#if FOLLY_HAVE_LIBGFLAGS
-#include <gflags/gflags.h>
-#else
+#include <folly/portability/Config.h>
+
+#if !FOLLY_HAVE_LIBGFLAGS
 // glog/logging.h is dependent on this implementation detail
 // being defined otherwise it undefines all of this -_-....
 //
   FOLLY_DEFINE_FLAG(unsigned long long, U64, _name, _default)
 #define DEFINE_string(_name, _default, _description) \
   FOLLY_DEFINE_FLAG(std::string, S, _name, _default)
+
+namespace google {
+class FlagSaver {};
+}
+
+#else
+#include <gflags/gflags.h>
 #endif