Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
CMake: remove MY_PROJ_LIB_PATH (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangWei authored and qinzuoyan committed Aug 8, 2019
1 parent 975c50d commit 5836aea
Show file tree
Hide file tree
Showing 28 changed files with 4 additions and 73 deletions.
15 changes: 4 additions & 11 deletions bin/dsn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function(dsn_install_executable)
endif()
endfunction()

function(ms_add_project PROJ_TYPE PROJ_NAME PROJ_SRC PROJ_INC_PATH PROJ_LIBS PROJ_LIB_PATH PROJ_BINPLACES)
function(ms_add_project PROJ_TYPE PROJ_NAME PROJ_SRC PROJ_INC_PATH PROJ_LIBS PROJ_BINPLACES)
if(NOT((PROJ_TYPE STREQUAL "STATIC") OR (PROJ_TYPE STREQUAL "SHARED") OR
(PROJ_TYPE STREQUAL "EXECUTABLE") OR (PROJ_TYPE STREQUAL "OBJECT")))
message(FATAL_ERROR "Invalid project type.")
Expand All @@ -63,9 +63,6 @@ function(ms_add_project PROJ_TYPE PROJ_NAME PROJ_SRC PROJ_INC_PATH PROJ_LIBS PRO
if(NOT (PROJ_INC_PATH STREQUAL ""))
include_directories(${PROJ_INC_PATH})
endif()
if(NOT (PROJ_LIB_PATH STREQUAL ""))
link_directories(${PROJ_LIB_PATH})
endif()

if((PROJ_TYPE STREQUAL "STATIC") OR (PROJ_TYPE STREQUAL "OBJECT"))
add_library(${PROJ_NAME} ${PROJ_TYPE} ${PROJ_SRC})
Expand Down Expand Up @@ -95,7 +92,6 @@ endfunction(ms_add_project)
# "GLOB" for non-recursive search
# - MY_PROJ_SRC
# - MY_PROJ_INC_PATH TODO(wutao1): remove this
# - MY_PROJ_LIB_PATH TODO(wutao1): remove this
# - MY_PROJ_LIBS
# - MY_BINPLACES
# Extra files that will be installed
Expand Down Expand Up @@ -129,9 +125,6 @@ function(dsn_add_project)
if(NOT DEFINED MY_PROJ_LIBS)
set(MY_PROJ_LIBS "")
endif()
if(NOT DEFINED MY_PROJ_LIB_PATH)
set(MY_PROJ_LIB_PATH "")
endif()
if(NOT DEFINED MY_BINPLACES)
set(MY_BINPLACES "")
endif()
Expand All @@ -143,7 +136,7 @@ function(dsn_add_project)
if((MY_PROJ_TYPE STREQUAL "SHARED") OR (MY_PROJ_TYPE STREQUAL "EXECUTABLE"))
set(MY_PROJ_LIBS ${MY_PROJ_LIBS} ${TEMP_LIBS} ${MY_BOOST_LIBS} ${DSN_SYSTEM_LIBS})
endif()
ms_add_project("${MY_PROJ_TYPE}" "${MY_PROJ_NAME}" "${MY_PROJ_SRC}" "${MY_PROJ_INC_PATH}" "${MY_PROJ_LIBS}" "${MY_PROJ_LIB_PATH}" "${MY_BINPLACES}")
ms_add_project("${MY_PROJ_TYPE}" "${MY_PROJ_NAME}" "${MY_PROJ_SRC}" "${MY_PROJ_INC_PATH}" "${MY_PROJ_LIBS}" "${MY_BINPLACES}")
endfunction(dsn_add_project)

function(dsn_add_static_library)
Expand Down Expand Up @@ -277,11 +270,11 @@ function(dsn_setup_system_libs)
)
endfunction(dsn_setup_system_libs)

function(dsn_setup_include_path)#TODO: remove this
function(dsn_setup_include_path)#TODO(huangwei5): remove this
include_directories(${DSN_THIRDPARTY_ROOT}/include)
endfunction(dsn_setup_include_path)

function(dsn_setup_link_path)#TODO: dsn_setup_thirdparty_libs()
function(dsn_setup_link_path)#TODO(huangwei5): dsn_setup_thirdparty_libs()
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
Expand Down
2 changes: 0 additions & 2 deletions src/core/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/core/perf_counter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/core/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ set(MY_PROJ_LIBS gtest

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

set(MY_PROJ_LIB_PATH "${GTEST_LIB_DIR}")

# Extra files that will be installed
set(MY_BINPLACES "${CMAKE_CURRENT_SOURCE_DIR}/config-bad-section.ini"
"${CMAKE_CURRENT_SOURCE_DIR}/config-dup-key.ini"
Expand Down
2 changes: 0 additions & 2 deletions src/core/tools/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/core/tools/hpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ ${CONQUEUE_INCLUDE_DIRS})

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/core/tools/simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/block_service/fds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH ${CMAKE_SOURCE_DIR}/thirdparty/output/include/fds )

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

#Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/block_service/local/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

#Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIB_PATH "")

dsn_add_static_library()

add_subdirectory(shell)
2 changes: 0 additions & 2 deletions src/dist/cli/shell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ list(APPEND MY_PROJ_LIBS dsn_runtime)

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

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "${CMAKE_CURRENT_SOURCE_DIR}/config.ini")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/failure_detector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/failure_detector_multimaster/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/nfs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/nfs/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ set(MY_PROJ_LIBS dsn_nfs dsn_runtime gtest)

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

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES
"${CMAKE_CURRENT_SOURCE_DIR}/nfs_test_file1"
Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/ddl_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

set(MY_BINPLACES "")

dsn_add_static_library()
2 changes: 0 additions & 2 deletions src/dist/replication/global_checker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH)

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ set(MY_PROJ_LIBS
dsn_http
)

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
5 changes: 0 additions & 5 deletions src/dist/replication/meta_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ set(MY_PROJ_LIBS
crypto
)

set(MY_PROJ_LIB_PATH
${LIBFDS_LIB_DIR}
${POCO_LIB_DIR}
)

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/storage_engine/simple_kv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ set(MY_PROJ_LIBS dsn_replica_server dsn_meta_server dsn_replication_client dsn_r

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

set(MY_PROJ_LIB_PATH "")

set(INI_FILES "")
file(GLOB
RES_FILES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ set(MY_PROJ_LIBS

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

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/test/meta_test/unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ set(MY_PROJ_LIBS

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

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES clear.sh run.sh config-ddl-test.ini config-test.ini suite1 suite2)

Expand Down
7 changes: 0 additions & 7 deletions src/dist/replication/test/simple_kv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ set(MY_PROJ_LIBS dsn_replica_server
)

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

set(MY_PROJ_LIB_PATH
${GTEST_LIB_DIR}
${ZOOKEEPER_LIB_DIR}
${LIBFDS_LIB_DIR}
${POCO_LIB_DIR}
)

# Extra files that will be installed
FILE(GLOB CASE_FILES "case-*")
Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/tool_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

set(MY_BINPLACES "")

dsn_add_static_library()
2 changes: 0 additions & 2 deletions src/dist/replication/zookeeper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_LIBS "")

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES "")

Expand Down
2 changes: 0 additions & 2 deletions src/tests/dsn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ set(MY_PROJ_LIBS

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

set(MY_PROJ_LIB_PATH "")

# Extra files that will be installed
set(MY_BINPLACES
"${CMAKE_CURRENT_SOURCE_DIR}/run.sh"
Expand Down

0 comments on commit 5836aea

Please sign in to comment.