diff --git a/cmake/check_packages.cmake b/cmake/check_packages.cmake
index 06887455418797f7162a5970669a0483e42a2db8..4b7cadfc85cd5c5bd9f1ff7e4dc833cf4f438005 100644
--- a/cmake/check_packages.cmake
+++ b/cmake/check_packages.cmake
@@ -14,13 +14,9 @@ if(WITH_STYLE_CHECK)
find_package(PythonInterp REQUIRED)
endif()
-if(WITH_GLOG)
- find_package(Glog REQUIRED)
-endif()
+find_package(Glog REQUIRED)
-if(WITH_GFLAGS)
- find_package(Gflags REQUIRED)
-endif()
+find_package(Gflags REQUIRED)
if(WITH_TESTING)
find_package(GTest REQUIRED)
diff --git a/cmake/util.cmake b/cmake/util.cmake
index eb7db7ce2ef20bf48b134378cfe7672f65a970a3..38366373c6dbcc1d05c359484ae73ace1bbc59be 100644
--- a/cmake/util.cmake
+++ b/cmake/util.cmake
@@ -65,7 +65,7 @@ endmacro()
# link_paddle_exe
# add paddle library for a paddle executable, such as trainer, pserver.
#
-# It will handle WITH_PYTHON/WITH_GLOG etc.
+# It will handle WITH_PYTHON etc.
function(link_paddle_exe TARGET_NAME)
if(WITH_RDMA)
generate_rdma_links()
@@ -108,6 +108,8 @@ function(link_paddle_exe TARGET_NAME)
paddle_cuda
${METRIC_LIBS}
${PROTOBUF_LIBRARY}
+ ${LIBGLOG_LIBRARY}
+ ${GFLAGS_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${CBLAS_LIBS}
${ZLIB_LIBRARIES}
@@ -125,16 +127,6 @@ function(link_paddle_exe TARGET_NAME)
${PYTHON_LIBRARIES})
endif()
- if(WITH_GLOG)
- target_link_libraries(${TARGET_NAME}
- ${LIBGLOG_LIBRARY})
- endif()
-
- if(WITH_GFLAGS)
- target_link_libraries(${TARGET_NAME}
- ${GFLAGS_LIBRARIES})
- endif()
-
if(WITH_GPU)
if(NOT WITH_DSO OR WITH_METRIC)
target_link_libraries(${TARGET_NAME}
diff --git a/doc/getstarted/build_and_install/build_from_source_en.md b/doc/getstarted/build_and_install/build_from_source_en.md
index 5db871d59ae83666263d03a6ea3b504d323293ee..aaa07d49d3148266db27670a98c2b27db4dc0a8f 100644
--- a/doc/getstarted/build_and_install/build_from_source_en.md
+++ b/doc/getstarted/build_and_install/build_from_source_en.md
@@ -49,10 +49,8 @@ PaddlePaddle supports some build options. To enable it, first you need to instal
WITH_GPU | Compile with GPU mode. |
WITH_DOUBLE | Compile with double precision floating-point, default: single precision. |
-WITH_GLOG | Compile with glog. If not found, default: an internal log implementation. |
-WITH_GFLAGS | Compile with gflags. If not found, default: an internal flag implementation. |
WITH_TESTING | Compile with gtest for PaddlePaddle's unit testing. |
-WITH_DOC | Compile to generate PaddlePaddle's docs, default: disabled (OFF). |
+WITH_DOC | Compile to generate PaddlePaddle's docs, default: disabled (OFF). |
WITH_SWIG_PY | Compile with python predict API, default: disabled (OFF). |
WITH_STYLE_CHECK | Compile with code style check, default: enabled (ON). |
diff --git a/doc/getstarted/build_and_install/cmake/compile_options.csv b/doc/getstarted/build_and_install/cmake/compile_options.csv
index 171d8fba71d14394c5bcda0bfde2231c3b173086..463b825470579d0c3736a408b1e82dd33e6f8d42 100644
--- a/doc/getstarted/build_and_install/cmake/compile_options.csv
+++ b/doc/getstarted/build_and_install/cmake/compile_options.csv
@@ -6,8 +6,6 @@ WITH_AVX,是否编译含有AVX指令集的PaddlePaddle二进制文件,是
WITH_PYTHON,是否内嵌PYTHON解释器。方便今后的嵌入式移植工作。,是
WITH_STYLE_CHECK,是否编译时进行代码风格检查,是
WITH_RDMA,是否开启RDMA,否
-WITH_GLOG,是否开启GLOG。如果不开启,则会使用一个简化版的日志,同时方便今后的嵌入式移植工作。,取决于是否寻找到GLOG
-WITH_GFLAGS,是否使用GFLAGS。如果不开启,则会使用一个简化版的命令行参数解析器,同时方便今后的嵌入式移植工作。,取决于是否寻找到GFLAGS
WITH_TIMER,是否开启计时功能。如果开启会导致运行略慢,打印的日志变多,但是方便调试和测Benchmark,否
WITH_TESTING,是否开启单元测试,取决于是否寻找到GTEST
WITH_DOC,是否编译中英文文档,否
diff --git a/doc/getstarted/build_and_install/ubuntu_install_cn.rst b/doc/getstarted/build_and_install/ubuntu_install_cn.rst
index f923a1917cf8eb837d776c1221f39591efd533d6..d02d9c63bbfb50954d7b75f2c685ce167a3b7146 100644
--- a/doc/getstarted/build_and_install/ubuntu_install_cn.rst
+++ b/doc/getstarted/build_and_install/ubuntu_install_cn.rst
@@ -46,8 +46,6 @@ PaddlePaddle提供了ubuntu 14.04 deb安装包。
with_double: OFF
with_python: ON
with_rdma: OFF
- with_glog: ON
- with_gflags: ON
with_metric_learning:
with_timer: OFF
with_predict_sdk:
diff --git a/paddle/api/CMakeLists.txt b/paddle/api/CMakeLists.txt
index 9b2d122a09adabd766014a9d21a167eec5b2de32..6ad1d79e59b11b2c1f7aacf22d13347b3fd8e0e2 100644
--- a/paddle/api/CMakeLists.txt
+++ b/paddle/api/CMakeLists.txt
@@ -17,22 +17,18 @@ add_library(paddle_api STATIC
${API_SOURCES})
add_dependencies(paddle_api gen_proto_cpp)
+list(LENGTH "${GFLAGS_LIBRARIES}" GFLAGS_LIBRARIES_LENGTH)
-if(WITH_GFLAGS)
- list(LENGTH "${GFLAGS_LIBRARIES}" GFLAGS_LIBRARIES_LENGTH)
-
- if(${GFLAGS_LIBRARIES_LENGTH} EQUAL 0 AND TARGET "${GFLAGS_LIBRARIES}")
- # Because gflags compiled by cmake, so it is imported by cmake target,
- # not a real library path. Get the real library path here.
- message(STATUS "GFLAGS Libraries is ${GFLAGS_LIBRARIES}")
- get_target_property(GFLAGS_LOCATION ${GFLAGS_LIBRARIES} LOCATION)
- message(STATUS "GFLAGS Target location is ${GFLAGS_LOCATION}")
- else()
- set(GFLAGS_LOCATION ${GFLAGS_LIBRARIES})
- endif()
+if(${GFLAGS_LIBRARIES_LENGTH} EQUAL 0 AND TARGET "${GFLAGS_LIBRARIES}")
+# Because gflags compiled by cmake, so it is imported by cmake target,
+# not a real library path. Get the real library path here.
+message(STATUS "GFLAGS Libraries is ${GFLAGS_LIBRARIES}")
+get_target_property(GFLAGS_LOCATION ${GFLAGS_LIBRARIES} LOCATION)
+message(STATUS "GFLAGS Target location is ${GFLAGS_LOCATION}")
+else()
+set(GFLAGS_LOCATION ${GFLAGS_LIBRARIES})
endif()
-
configure_file(
paddle_api_config.py.in
${PROJ_ROOT}/paddle/api/paddle_api_config.py
@@ -57,7 +53,7 @@ add_custom_command(OUTPUT ${PROJ_ROOT}/paddle/dist/.timestamp
paddle_trainer
paddle_api
paddle_cuda
- ${PY_PADDLE_PYTHON_FILES}
+ ${PY_PADDLE_PYTHON_FILES}
)
install(DIRECTORY ${PROJ_ROOT}/paddle/dist/
diff --git a/paddle/api/paddle_api_config.py.in b/paddle/api/paddle_api_config.py.in
index a2352250c31efa7ee3c4c8338d95dce5a5b9a511..23542b952b7699d66cf64b47d0354e9078ae06d9 100644
--- a/paddle/api/paddle_api_config.py.in
+++ b/paddle/api/paddle_api_config.py.in
@@ -8,9 +8,7 @@ CMAKE_DL_LIBS="@CMAKE_DL_LIBS@"
WITH_PYTHON="@WITH_PYTHON@"
PYTHON_LIBRARIES="@PYTHON_LIBRARIES@"
-WITH_GLOG="@WITH_GLOG@"
LIBGLOG_LIBRARY="@LIBGLOG_LIBRARY@"
-WITH_GFLAGS="@WITH_GFLAGS@"
GFLAGS_LIBRARIES="@GFLAGS_LIBRARIES@"
GFLAGS_LOCATION="@GFLAGS_LOCATION@"
CBLAS_LIBRARIES="@CBLAS_LIBS@"
diff --git a/paddle/api/paddle_ld_flags.py b/paddle/api/paddle_ld_flags.py
index 85cc54700faceb5a514cebe665a2da5ed2f7aa3c..51d7dfee58b786512201577872559ae510051ba9 100644
--- a/paddle/api/paddle_ld_flags.py
+++ b/paddle/api/paddle_ld_flags.py
@@ -47,10 +47,8 @@ try:
self.with_python = PaddleLDFlag.cmake_bool(WITH_PYTHON)
self.python_libs = PYTHON_LIBRARIES
- self.with_glog = PaddleLDFlag.cmake_bool(WITH_GLOG)
self.glog_libs = LIBGLOG_LIBRARY
- self.with_gflags = PaddleLDFlag.cmake_bool(WITH_GFLAGS)
self.with_coverage = PaddleLDFlag.cmake_bool(WITH_COVERALLS)
self.gflags_libs = GFLAGS_LIBRARIES
self.gflags_location = GFLAGS_LOCATION
@@ -88,6 +86,8 @@ try:
"-lpaddle_cuda",
"-lpaddle_api",
self.normalize_flag(self.protolib),
+ self.normalize_flag(self.glog_libs),
+ self.normalize_flag(self.gflags_libs),
self.normalize_flag(self.zlib),
self.normalize_flag(self.thread),
self.normalize_flag(self.dl_libs),
@@ -96,10 +96,6 @@ try:
if self.with_python:
libs.append(self.normalize_flag(self.python_libs))
- if self.with_glog:
- libs.append(self.normalize_flag(self.glog_libs))
- if self.with_gflags:
- libs.append(self.normalize_flag(self.gflags_libs))
if self.with_gpu:
libs.append(self.normalize_flag(self.curt))
if self.with_coverage:
diff --git a/paddle/scripts/submit_local.sh.in b/paddle/scripts/submit_local.sh.in
index ace2c0dee972e338001a0e5a4045c32e64ff157e..283fd34a6d8a2268f3800ec69920e128ac75e7dc 100644
--- a/paddle/scripts/submit_local.sh.in
+++ b/paddle/scripts/submit_local.sh.in
@@ -21,8 +21,6 @@ function version(){
echo " with_double: @WITH_DOUBLE@"
echo " with_python: @WITH_PYTHON@"
echo " with_rdma: @WITH_RDMA@"
- echo " with_glog: @WITH_GLOG@"
- echo " with_gflags: @WITH_GFLAGS@"
echo " with_metric_learning: @WITH_METRIC@"
echo " with_timer: @WITH_TIMER@"
echo " with_predict_sdk: @WITH_PREDICT_SDK@"