Commit 42de92b4 authored by zhujiashun's avatar zhujiashun

revert flag name of glog to WITH_GLOG in cmake

parent 730656fe
...@@ -22,15 +22,16 @@ else() ...@@ -22,15 +22,16 @@ else()
message(WARNING "You are using an unsupported compiler! Compilation has only been tested with Clang and GCC.") message(WARNING "You are using an unsupported compiler! Compilation has only been tested with Clang and GCC.")
endif() endif()
option(BRPC_WITH_GLOG "With glog" OFF) option(WITH_GLOG "With glog" OFF)
option(DEBUG "Print debug logs" OFF) option(DEBUG "Print debug logs" OFF)
option(WITH_DEBUG_SYMBOLS "With debug symbols" ON) option(WITH_DEBUG_SYMBOLS "With debug symbols" ON)
option(WITH_THRIFT "With thrift framed protocol supported" OFF) option(WITH_THRIFT "With thrift framed protocol supported" OFF)
option(BUILD_UNIT_TESTS "Whether to build unit tests" OFF) option(BUILD_UNIT_TESTS "Whether to build unit tests" OFF)
set(WITH_GLOG_VAL "0") set(WITH_GLOG_VAL "0")
if(BRPC_WITH_GLOG) if(WITH_GLOG)
set(WITH_GLOG_VAL "1") set(WITH_GLOG_VAL "1")
set(BRPC_WITH_GLOG 1)
endif() endif()
if(WITH_DEBUG_SYMBOLS) if(WITH_DEBUG_SYMBOLS)
...@@ -121,7 +122,7 @@ if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB)) ...@@ -121,7 +122,7 @@ if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB))
message(FATAL_ERROR "Fail to find leveldb") message(FATAL_ERROR "Fail to find leveldb")
endif() endif()
if(BRPC_WITH_GLOG) if(WITH_GLOG)
find_path(GLOG_INCLUDE_PATH NAMES glog/logging.h) find_path(GLOG_INCLUDE_PATH NAMES glog/logging.h)
find_library(GLOG_LIB NAMES glog) find_library(GLOG_LIB NAMES glog)
if((NOT GLOG_INCLUDE_PATH) OR (NOT GLOG_LIB)) if((NOT GLOG_INCLUDE_PATH) OR (NOT GLOG_LIB))
...@@ -165,7 +166,7 @@ set(DYNAMIC_LIB ...@@ -165,7 +166,7 @@ set(DYNAMIC_LIB
) )
set(BRPC_PRIVATE_LIBS "-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz") set(BRPC_PRIVATE_LIBS "-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz")
if(BRPC_WITH_GLOG) if(WITH_GLOG)
set(DYNAMIC_LIB ${DYNAMIC_LIB} ${GLOG_LIB}) set(DYNAMIC_LIB ${DYNAMIC_LIB} ${GLOG_LIB})
set(BRPC_PRIVATE_LIBS "${BRPC_PRIVATE_LIBS} -lglog") set(BRPC_PRIVATE_LIBS "${BRPC_PRIVATE_LIBS} -lglog")
endif() endif()
......
...@@ -84,7 +84,7 @@ To change compiler to clang, overwrite environment variable CC and CXX to clang ...@@ -84,7 +84,7 @@ To change compiler to clang, overwrite environment variable CC and CXX to clang
To not link debugging symbols, use `cmake -DWITH_DEBUG_SYMBOLS=OFF ..` and compiled binaries will be much smaller. To not link debugging symbols, use `cmake -DWITH_DEBUG_SYMBOLS=OFF ..` and compiled binaries will be much smaller.
To use brpc with glog, add `-DBRPC_WITH_GLOG=ON`. To use brpc with glog, add `-DWITH_GLOG=ON`.
To enable [thrift support](../en/thrift.md), install thrift first and add `-DWITH_THRIFT=ON`. To enable [thrift support](../en/thrift.md), install thrift first and add `-DWITH_THRIFT=ON`.
...@@ -175,7 +175,7 @@ To change compiler to clang, overwrite environment variable CC and CXX to clang ...@@ -175,7 +175,7 @@ To change compiler to clang, overwrite environment variable CC and CXX to clang
To not link debugging symbols, use `cmake -DWITH_DEBUG_SYMBOLS=OFF ..` and compiled binaries will be much smaller. To not link debugging symbols, use `cmake -DWITH_DEBUG_SYMBOLS=OFF ..` and compiled binaries will be much smaller.
To use brpc with glog, add `-DBRPC_WITH_GLOG=ON`. To use brpc with glog, add `-DWITH_GLOG=ON`.
To enable [thrift support](../en/thrift.md), install thrift first and add `-DWITH_THRIFT=ON`. To enable [thrift support](../en/thrift.md), install thrift first and add `-DWITH_THRIFT=ON`.
...@@ -249,7 +249,7 @@ To change compiler to clang, overwrite environment variable CC and CXX to clang ...@@ -249,7 +249,7 @@ To change compiler to clang, overwrite environment variable CC and CXX to clang
To not link debugging symbols, use `cmake -DWITH_DEBUG_SYMBOLS=OFF ..` and compiled binaries will be much smaller. To not link debugging symbols, use `cmake -DWITH_DEBUG_SYMBOLS=OFF ..` and compiled binaries will be much smaller.
To use brpc with glog, add `-DBRPC_WITH_GLOG=ON`. To use brpc with glog, add `-DWITH_GLOG=ON`.
To enable [thrift support](../en/thrift.md), install thrift first and add `-DWITH_THRIFT=ON`. To enable [thrift support](../en/thrift.md), install thrift first and add `-DWITH_THRIFT=ON`.
...@@ -316,7 +316,7 @@ mkdir bld && cd bld && cmake .. && make ...@@ -316,7 +316,7 @@ mkdir bld && cd bld && cmake .. && make
To not link debugging symbols, use `cmake -DWITH_DEBUG_SYMBOLS=OFF ..` and compiled binaries will be much smaller. To not link debugging symbols, use `cmake -DWITH_DEBUG_SYMBOLS=OFF ..` and compiled binaries will be much smaller.
To use brpc with glog, add `-DBRPC_WITH_GLOG=ON`. To use brpc with glog, add `-DWITH_GLOG=ON`.
To enable [thrift support](../en/thrift.md), install thrift first and add `-DWITH_THRIFT=ON`. To enable [thrift support](../en/thrift.md), install thrift first and add `-DWITH_THRIFT=ON`.
...@@ -392,7 +392,7 @@ When you remove tcmalloc, not only remove the linkage with tcmalloc but also the ...@@ -392,7 +392,7 @@ When you remove tcmalloc, not only remove the linkage with tcmalloc but also the
## glog: 3.3+ ## glog: 3.3+
brpc implements a default [logging utility](../../src/butil/logging.h) which conflicts with glog. To replace this with glog, add *--with-glog* to config_brpc.sh or add `-DBRPC_WITH_GLOG=ON` to cmake. brpc implements a default [logging utility](../../src/butil/logging.h) which conflicts with glog. To replace this with glog, add *--with-glog* to config_brpc.sh or add `-DWITH_GLOG=ON` to cmake.
## valgrind: 3.8+ ## valgrind: 3.8+
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment