Skip to content

Commit

Permalink
build: remove MY_PROJ_INC_PATH (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangWei authored and qinzuoyan committed Aug 27, 2019
1 parent af174a4 commit 6dfd6e9
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 36 deletions.
3 changes: 1 addition & 2 deletions src/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_SRC "")

set(MY_PROJ_INC_PATH "")

dsn_add_static_library()

target_link_libraries(pegasus_base PUBLIC RocksDB::rocksdb)
target_include_directories(pegasus_base PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
2 changes: 0 additions & 2 deletions src/geo/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS
pegasus_geo_lib
s2testing
Expand Down
2 changes: 0 additions & 2 deletions src/geo/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS ""
# s2
# pegasus_client_static
Expand Down
5 changes: 3 additions & 2 deletions src/geo/lib/geo_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
#include <dsn/service_api_cpp.h>
#include <dsn/dist/fmt_logging.h>
#include <dsn/utility/errors.h>
#include <base/pegasus_key_schema.h>
#include <base/pegasus_utils.h>

#include "base/pegasus_key_schema.h"
#include "base/pegasus_utils.h"

namespace pegasus {
namespace geo {
Expand Down
3 changes: 0 additions & 3 deletions src/redis_protocol/proxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "../../base" "../proxy_lib")

set(MY_PROJ_LIBS pegasus.rproxylib
pegasus_base
pegasus_geo_lib
pegasus_reporter
prometheus-cpp-pull
Expand Down
7 changes: 4 additions & 3 deletions src/redis_protocol/proxy_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "../../base")

set(MY_PROJ_LIBS "")

add_definitions(-Wno-attributes)

dsn_add_static_library()

target_link_libraries(${MY_PROJ_NAME} PRIVATE RocksDB::rocksdb) # TODO(huangwei5): dsn_add_static_library doesnt link libs, need fix
target_link_libraries(${MY_PROJ_NAME} PRIVATE RocksDB::rocksdb
pegasus_base) # TODO(huangwei5): dsn_add_static_library doesnt link libs, need fix

target_include_directories(${MY_PROJ_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
2 changes: 0 additions & 2 deletions src/redis_protocol/proxy_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "../../base" "../proxy_lib")

set(MY_PROJ_LIBS gtest pthread)

set(MY_BOOST_LIBS Boost::system Boost::filesystem)
Expand Down
2 changes: 0 additions & 2 deletions src/reporter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

dsn_add_static_library()

target_link_libraries(${MY_PROJ_NAME} PUBLIC pegasus_base) # TODO(huangwei5): dsn_add_static_library doesnt link libs, need fix
6 changes: 3 additions & 3 deletions src/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS
dsn_replica_server
dsn_meta_server
Expand All @@ -23,6 +21,7 @@ set(MY_PROJ_LIBS
dsn.replication.zookeeper_provider
RocksDB::rocksdb
pegasus_reporter
pegasus_base
prometheus-cpp-pull
prometheus-cpp-push
prometheus-cpp-core
Expand All @@ -40,7 +39,8 @@ set(MY_PROJ_LIBS
fmt
rt
aio
pthread)
pthread
)

set(MY_BOOST_LIBS Boost::system Boost::filesystem Boost::regex)

Expand Down
9 changes: 6 additions & 3 deletions src/shell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ set(MY_PROJ_SRC "linenoise/linenoise.c" "sds/sds.c")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB_RECURSE")

set(MY_PROJ_INC_PATH "${PEGASUS_PROJECT_DIR}/src/base")

set(MY_PROJ_LIBS
pegasus_base
dsn.replication.tool
dsn_replica_server
dsn_replication_common
Expand All @@ -38,7 +37,11 @@ set(MY_PROJ_LIBS

set(MY_BINPLACES "${CMAKE_CURRENT_SOURCE_DIR}/config.ini")

set(MY_BOOST_LIBS Boost::system Boost::filesystem Boost::regex)
set(MY_BOOST_LIBS
Boost::system
Boost::filesystem
Boost::regex # dsn_replica_server.so needs
)

SET(CMAKE_INSTALL_RPATH ".")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
Expand Down
3 changes: 1 addition & 2 deletions src/test/bench_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "../../../rocksdb")

set(MY_PROJ_LIBS
pegasus_client_static
RocksDB::rocksdb
Expand All @@ -22,4 +20,5 @@ set(MY_BOOST_LIBS Boost::system Boost::filesystem)
set(MY_BINPLACES "config.ini")

dsn_add_executable()

dsn_install_executable()
2 changes: 0 additions & 2 deletions src/test/function_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS
dsn.replication.ddlclient
dsn_replication_common
Expand Down
5 changes: 2 additions & 3 deletions src/test/kill_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ project(${MY_PROJ_NAME} C CXX)

# Source files under CURRENT project directory will be automatically included.
# You can manually set MY_PROJ_SRC to include source files under other directories.
set(MY_PROJ_SRC ../function_test/global_env.cpp)
set(MY_PROJ_SRC "")

# Search mode for source files under CURRENT project directory?
# "GLOB_RECURSE" for recursive search
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "../function_test")

set(MY_PROJ_LIBS
pegasus_base
pegasus_client_static
dsn.replication.ddlclient
dsn_replication_common
Expand Down
2 changes: 0 additions & 2 deletions src/test/pressure_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS
pegasus_client_static
)
Expand Down
5 changes: 2 additions & 3 deletions src/test/upgrade_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ project(${MY_PROJ_NAME} C CXX)

# Source files under CURRENT project directory will be automatically included.
# You can manually set MY_PROJ_SRC to include source files under other directories.
set(MY_PROJ_SRC ../function_test/global_env.cpp)
set(MY_PROJ_SRC "")

# Search mode for source files under CURRENT project directory?
# "GLOB_RECURSE" for recursive search
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "../function_test")

set(MY_PROJ_LIBS
pegasus_base
pegasus_client_static
dsn.replication.ddlclient
dsn_replication_common
Expand Down

0 comments on commit 6dfd6e9

Please sign in to comment.