未验证 提交 1b7c1c56 编写于 作者: H huangjiyi 提交者: GitHub

fix compile errors with gflags (#56993)

* update

* update

* update

* update

* update
上级 f6a8125f
...@@ -201,10 +201,6 @@ if(WITH_DISTRIBUTE) ...@@ -201,10 +201,6 @@ if(WITH_DISTRIBUTE)
add_definitions(-DPADDLE_WITH_DISTRIBUTE) add_definitions(-DPADDLE_WITH_DISTRIBUTE)
endif() endif()
if(WITH_GFLAGS)
add_definitions(-DPADDLE_WITH_GFLAGS)
endif()
if(WITH_PSCORE) if(WITH_PSCORE)
add_definitions(-DPADDLE_WITH_PSCORE) add_definitions(-DPADDLE_WITH_PSCORE)
endif() endif()
......
...@@ -110,6 +110,7 @@ endif() ...@@ -110,6 +110,7 @@ endif()
set(flags_dep) set(flags_dep)
if(WITH_GFLAGS) if(WITH_GFLAGS)
list(APPEND flags_dep gflags) list(APPEND flags_dep gflags)
add_definitions(-DPADDLE_WITH_GFLAGS)
else() else()
list(APPEND flags_dep paddle_flags) list(APPEND flags_dep paddle_flags)
endif() endif()
...@@ -79,8 +79,8 @@ using gflags::DoubleFromEnv; ...@@ -79,8 +79,8 @@ using gflags::DoubleFromEnv;
using gflags::Int32FromEnv; using gflags::Int32FromEnv;
using gflags::Int64FromEnv; using gflags::Int64FromEnv;
using gflags::StringFromEnv; using gflags::StringFromEnv;
using gflags::UInt32FromEnv; using gflags::Uint32FromEnv;
using gflags::UInt64FromEnv; using gflags::Uint64FromEnv;
#else #else
#define DEFINE_FROM_ENV_FUNC(type, name) \ #define DEFINE_FROM_ENV_FUNC(type, name) \
inline type name##FromEnv(const std::string& env_var_name, \ inline type name##FromEnv(const std::string& env_var_name, \
...@@ -90,9 +90,9 @@ using gflags::UInt64FromEnv; ...@@ -90,9 +90,9 @@ using gflags::UInt64FromEnv;
DEFINE_FROM_ENV_FUNC(bool, Bool); DEFINE_FROM_ENV_FUNC(bool, Bool);
DEFINE_FROM_ENV_FUNC(int32_t, Int32); DEFINE_FROM_ENV_FUNC(int32_t, Int32);
DEFINE_FROM_ENV_FUNC(uint32_t, UInt32); DEFINE_FROM_ENV_FUNC(uint32_t, Uint32);
DEFINE_FROM_ENV_FUNC(int64_t, Int64); DEFINE_FROM_ENV_FUNC(int64_t, Int64);
DEFINE_FROM_ENV_FUNC(uint64_t, UInt64); DEFINE_FROM_ENV_FUNC(uint64_t, Uint64);
DEFINE_FROM_ENV_FUNC(double, Double); DEFINE_FROM_ENV_FUNC(double, Double);
DEFINE_FROM_ENV_FUNC(std::string, String); DEFINE_FROM_ENV_FUNC(std::string, String);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册