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

Commit

Permalink
build: remove MY_PROJ_INC_PATH (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangWei authored and qinzuoyan committed Aug 28, 2019
1 parent c3c1326 commit a50fc84
Show file tree
Hide file tree
Showing 33 changed files with 17 additions and 76 deletions.
12 changes: 2 additions & 10 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_BINPLACES)
function(ms_add_project PROJ_TYPE PROJ_NAME PROJ_SRC 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 @@ -60,10 +60,6 @@ function(ms_add_project PROJ_TYPE PROJ_NAME PROJ_SRC PROJ_INC_PATH PROJ_LIBS PRO
message(FATAL_ERROR "No source files.")
endif()

if(NOT (PROJ_INC_PATH STREQUAL ""))
include_directories(${PROJ_INC_PATH})
endif()

if((PROJ_TYPE STREQUAL "STATIC") OR (PROJ_TYPE STREQUAL "OBJECT"))
add_library(${PROJ_NAME} ${PROJ_TYPE} ${PROJ_SRC})
elseif(PROJ_TYPE STREQUAL "SHARED")
Expand Down Expand Up @@ -91,7 +87,6 @@ endfunction(ms_add_project)
# "GLOB_RECURSE" for recursive search
# "GLOB" for non-recursive search
# - MY_PROJ_SRC
# - MY_PROJ_INC_PATH TODO(wutao1): remove this
# - MY_PROJ_LIBS
# - MY_BINPLACES
# Extra files that will be installed
Expand Down Expand Up @@ -119,9 +114,6 @@ function(dsn_add_project)
)
set(MY_PROJ_SRC ${TEMP_SRC} ${MY_PROJ_SRC})

if(NOT DEFINED MY_PROJ_INC_PATH)
set(MY_PROJ_INC_PATH "")
endif()
if(NOT DEFINED MY_PROJ_LIBS)
set(MY_PROJ_LIBS "")
endif()
Expand All @@ -136,7 +128,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_BINPLACES}")
ms_add_project("${MY_PROJ_TYPE}" "${MY_PROJ_NAME}" "${MY_PROJ_SRC}" "${MY_PROJ_LIBS}" "${MY_BINPLACES}")
endfunction(dsn_add_project)

function(dsn_add_static_library)
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 @@ -5,8 +5,6 @@ set(MY_PROJ_NAME dsn.core)
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS "")

# Extra files that will be installed
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 @@ -7,8 +7,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 "")

# Extra files that will be installed
Expand Down
5 changes: 0 additions & 5 deletions src/core/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ set(MY_PROJ_NAME dsn.core.tests)
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH
${GTEST_INCLUDE_DIR}
../core ../tools/common ../tools/simulator ../tools/hpc ../tools/nfs
)

set(MY_PROJ_LIBS gtest
dsn_runtime
)
Expand Down
2 changes: 1 addition & 1 deletion src/core/tests/env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <dsn/tool-api/env_provider.h>
#include <gtest/gtest.h>
#include <dsn/utility/rand.h>
#include "../tools/simulator/env.sim.h"
#include "core/tools/simulator/env.sim.h"

using namespace ::dsn;

Expand Down
2 changes: 1 addition & 1 deletion src/core/tests/fail_point_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "fail_point_impl.h"
#include "core/core/fail_point_impl.h"

#include <gtest/gtest.h>

Expand Down
2 changes: 1 addition & 1 deletion src/core/tests/lock.std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* xxxx-xx-xx, author, fix bug about xxx
*/

#include "../tools/common/lockp.std.h"
#include "core/tools/common/lockp.std.h"
#include <gtest/gtest.h>

using namespace dsn;
Expand Down
2 changes: 1 addition & 1 deletion src/core/tests/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* xxxx-xx-xx, author, fix bug about xxx
*/

#include "../tools/common/simple_logger.h"
#include "core/tools/common/simple_logger.h"
#include <gtest/gtest.h>
#include <dsn/utility/filesystem.h>

Expand Down
2 changes: 1 addition & 1 deletion src/core/tests/memutil_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// Unit test for memutil.cc

#include "memutil.h"
#include "core/core/memutil.h"

#include <gtest/gtest.h>

Expand Down
8 changes: 4 additions & 4 deletions src/core/tests/netprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
#include <dsn/tool-api/task.h>
#include <dsn/tool-api/task_spec.h>

#include "../tools/common/asio_net_provider.h"
#include "../tools/common/network.sim.h"
#include "../core/service_engine.h"
#include "../core/rpc_engine.h"
#include "core/tools/common/asio_net_provider.h"
#include "core/tools/common/network.sim.h"
#include "core/core/service_engine.h"
#include "core/core/rpc_engine.h"
#include "test_utils.h"

using namespace dsn;
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 @@ -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 "")

# Extra files that will be installed
Expand Down
3 changes: 0 additions & 3 deletions src/core/tools/hpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH ""
${CONQUEUE_INCLUDE_DIRS})

set(MY_PROJ_LIBS "")

# Extra files that will be installed
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 @@ -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 "")

# Extra files that will be installed
Expand Down
5 changes: 3 additions & 2 deletions src/dist/block_service/fds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ set(MY_PROJ_SRC "")
#"GLOB" for non - recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH ${CMAKE_SOURCE_DIR}/thirdparty/output/include/fds )

set(MY_PROJ_LIBS "")

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

dsn_add_static_library()

find_path(FDS_INCLUDE_DIR NAMES constants.h PATHS ${DSN_THIRDPARTY_ROOT}/include PATH_SUFFIXES fds) # TODO(huangwei5): move to dsn_setup_thirdparty_libs(), if not found, return fatal
target_include_directories(dsn.block_service.fds PRIVATE "${FDS_INCLUDE_DIR}")
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 @@ -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 "")

#Extra files that will be installed
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 @@ -9,8 +9,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()

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 @@ -9,8 +9,6 @@ set(MY_PROJ_SRC "")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

if (UNIX)
set(MY_PROJ_LIBS pthread dsn_cli)
else()
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 @@ -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 "")

# Extra files that will be installed
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 @@ -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 "")

# Extra files that will be installed
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 @@ -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 "")

# Extra files that will be installed
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 @@ -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_nfs dsn_runtime gtest)

set(MY_BOOST_LIBS Boost::system Boost::filesystem)
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 @@ -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 "")

# Extra files that will be installed
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 @@ -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 "")

# Extra files that will be installed
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 @@ -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 "")

set(MY_BINPLACES "")
Expand Down
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 @@ -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 "")

# Extra files that will be installed
Expand Down
6 changes: 3 additions & 3 deletions src/dist/replication/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ set(MY_PROJ_SRC ${DUPLICATION_SRC})
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS
set(MY_PROJ_LIBS
dsn_replication_common
dsn.failure_detector
dsn.failure_detector.multimaster
Expand All @@ -27,6 +25,8 @@ set(MY_PROJ_LIBS
dsn_runtime
)

set(MY_BOOST_LIBS Boost::regex)

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

Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/meta_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ set(MY_PROJ_SRC "${DUPLICATION_SRC}")
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB_RECURSE")

set(MY_PROJ_INC_PATH)

set(MY_PROJ_LIBS
dsn_replication_common
dsn.block_service.local
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 @@ -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 dsn_replication_client dsn_runtime fmt)

set(MY_BOOST_LIBS Boost::system Boost::filesystem Boost::regex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ set(MY_PROJ_SRC ../misc/misc.cpp)
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH)

set(MY_PROJ_LIBS
dsn_meta_server
dsn_replication_common
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 @@ -13,8 +13,6 @@ set(MY_PROJ_SRC ${MY_PROJ_SRC} ../misc/misc.cpp)
# "GLOB" for non-recursive search
set(MY_SRC_SEARCH_MODE "GLOB")

set(MY_PROJ_INC_PATH "")

set(MY_PROJ_LIBS
dsn.replication.zookeeper_provider
dsn_replication_common
Expand Down
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_meta_server
dsn_replica_server
dsn.replication.zookeeper_provider
Expand Down
2 changes: 0 additions & 2 deletions src/dist/replication/test/simple_kv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ set(MY_PROJ_NAME dsn.rep_tests.simple_kv)
set(MY_SRC_SEARCH_MODE "GLOB")
set(MY_PROJ_SRC ${MY_PROJ_SRC} ../../storage_engine/simple_kv/simple_kv_types.cpp)

set(MY_PROJ_INC_PATH)

set(MY_PROJ_LIBS dsn_replica_server
dsn_meta_server
dsn_replication_common
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 @@ -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 "")

set(MY_BINPLACES "")
Expand Down

0 comments on commit a50fc84

Please sign in to comment.