Skip to content

Commit

Permalink
cmake not ok
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed May 17, 2024
1 parent c9c9253 commit 99583de
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 72 deletions.
65 changes: 59 additions & 6 deletions src/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,64 @@
# specific language governing permissions and limitations
# under the License.

set(SERVER_COMMON_SRC
${CMAKE_CURRENT_SOURCE_DIR}/server_utils.cpp)

set(COLLECTOR_SRC
${SERVER_COMMON_SRC}
${CMAKE_CURRENT_SOURCE_DIR}/available_detector.cpp
${CMAKE_CURRENT_SOURCE_DIR}/info_collector.cpp
${CMAKE_CURRENT_SOURCE_DIR}/info_collector_app.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hotspot_partition_calculator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/result_writer.cpp)

set(META_SERVER_SRC
${SERVER_COMMON_SRC})

set(REPLICA_SERVER_SRC
${SERVER_COMMON_SRC}
${CMAKE_CURRENT_SOURCE_DIR}/capacity_unit_calculator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/compaction_filter_rule.cpp
${CMAKE_CURRENT_SOURCE_DIR}/compaction_operation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hotkey_collector.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pegasus_event_listener.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pegasus_manual_compact_service.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pegasus_mutation_duplicator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pegasus_server_impl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pegasus_server_impl_init.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pegasus_server_write.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pegasus_write_service.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rocksdb_wrapper.cpp)

set(SERVER_COMMON_LIBS
dsn_utils)
set(COLLECTOR_LIBS
${SERVER_COMMON_LIBS}
dsn_meta_server
pegasus_client_static
event)
set(META_SERVER_LIBS
${SERVER_COMMON_LIBS}
dsn_meta_server
dsn.failure_detector
dsn.replication.zookeeper_provider
dsn.block_service
event
zookeeper
hashtable)
set(REPLICA_SERVER_LIBS
${SERVER_COMMON_LIBS}
dsn_replica_server
dsn_replication_common
dsn_client
dsn.block_service.local
dsn.block_service
dsn.failure_detector
rocksdb
pegasus_base
pegasus_client_static
event)

if (SEPARATE_SERVERS)
add_subdirectory(collector)
add_subdirectory(meta_server)
Expand All @@ -26,7 +84,6 @@ else ()
set(MY_PROJ_LIBS
dsn_replica_server
dsn_meta_server
dsn_ranger
dsn_replication_common
dsn_client
dsn.block_service.local
Expand All @@ -35,16 +92,12 @@ else ()
dsn.replication.zookeeper_provider
dsn_utils
rocksdb
lz4
zstd
snappy
pegasus_base
pegasus_client_static
event
hashtable)
set(MY_BOOST_LIBS Boost::system Boost::filesystem)
set(MY_BINPLACES
config.ini)
set(MY_BINPLACES config.ini)
SET(CMAKE_INSTALL_RPATH ".")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
dsn_add_executable()
Expand Down
22 changes: 2 additions & 20 deletions src/server/collector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,11 @@

set(MY_PROJ_NAME "pegasus_collector")

set(MY_PROJ_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/../available_detector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../info_collector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../info_collector_app.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../server_utils.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../result_writer.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../hotspot_partition_calculator.cpp")

set(MY_PROJ_SRC ${COLLECTOR_SRC})
set(MY_SRC_SEARCH_MODE "GLOB")

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../")

set(MY_PROJ_LIBS
dsn_meta_server
dsn.failure_detector
dsn_utils
dsn.block_service
pegasus_base
pegasus_client_static
event)

set(MY_PROJ_LIBS ${COLLECTOR_LIBS})
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

SET(CMAKE_INSTALL_RPATH ".")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

Expand Down
19 changes: 2 additions & 17 deletions src/server/meta_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,11 @@

set(MY_PROJ_NAME "pegasus_meta_server")

set(MY_PROJ_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/../server_utils.cpp")

set(MY_PROJ_SRC ${META_SERVER_SRC})
set(MY_SRC_SEARCH_MODE "GLOB")

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../")

set(MY_PROJ_LIBS
dsn_meta_server
dsn.failure_detector
dsn.replication.zookeeper_provider
dsn_utils
dsn.block_service
pegasus_base
event
zookeeper
hashtable)

set(MY_PROJ_LIBS ${META_SERVER_LIBS})
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

SET(CMAKE_INSTALL_RPATH ".")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

Expand Down
31 changes: 2 additions & 29 deletions src/server/replica_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,11 @@

set(MY_PROJ_NAME "pegasus_replica_server")

set(TEMP_SRC "")
file("GLOB" TEMP_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/../*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../*.c")
set(MY_PROJ_SRC ${TEMP_SRC})
list(REMOVE_ITEM MY_PROJ_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../main.cpp)
list(REMOVE_ITEM MY_PROJ_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../available_detector.cpp)
list(REMOVE_ITEM MY_PROJ_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../info_collector.cpp)
list(REMOVE_ITEM MY_PROJ_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../info_collector_app.cpp)
list(REMOVE_ITEM MY_PROJ_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../result_writer.cpp)
list(REMOVE_ITEM MY_PROJ_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../hotspot_partition_calculator.cpp)

set(MY_PROJ_SRC ${REPLICA_SERVER_SRC})
set(MY_SRC_SEARCH_MODE "GLOB")

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../")

set(MY_PROJ_LIBS
dsn_replica_server
dsn_meta_server
dsn_replication_common
dsn_client
dsn.block_service.local
dsn.block_service
dsn.failure_detector
dsn_utils
rocksdb
pegasus_base
pegasus_client_static
event)

set(MY_PROJ_LIBS ${REPLICA_SERVER_LIBS})
set(MY_BOOST_LIBS Boost::system Boost::filesystem)

SET(CMAKE_INSTALL_RPATH ".")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

Expand Down

0 comments on commit 99583de

Please sign in to comment.