From 414cbf860f8122273ac6296bf143a0b5f9a8ad3b Mon Sep 17 00:00:00 2001 From: "yangwei.yao" Date: Wed, 8 May 2019 17:01:11 +0800 Subject: [PATCH] Update CMakeLists.txt Former-commit-id: 6007ad4c75ca615d6d21236a2ea5affe347672d1 --- cpp/unittest/CMakeLists.txt | 3 +- cpp/unittest/license/CMakeLists.txt | 53 ++++++++++++++++++++++++++ cpp/unittest/license/license_tests.cpp | 15 ++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 cpp/unittest/license/CMakeLists.txt create mode 100644 cpp/unittest/license/license_tests.cpp diff --git a/cpp/unittest/CMakeLists.txt b/cpp/unittest/CMakeLists.txt index 454354eb..0982b089 100644 --- a/cpp/unittest/CMakeLists.txt +++ b/cpp/unittest/CMakeLists.txt @@ -19,4 +19,5 @@ set(unittest_libs add_subdirectory(server) add_subdirectory(db) -add_subdirectory(faiss_wrapper) \ No newline at end of file +add_subdirectory(faiss_wrapper) +#add_subdirectory(license) \ No newline at end of file diff --git a/cpp/unittest/license/CMakeLists.txt b/cpp/unittest/license/CMakeLists.txt new file mode 100644 index 00000000..103f9329 --- /dev/null +++ b/cpp/unittest/license/CMakeLists.txt @@ -0,0 +1,53 @@ +#------------------------------------------------------------------------------- +# Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +# Unauthorized copying of this file, via any medium is strictly prohibited. +# Proprietary and confidential. +#------------------------------------------------------------------------------- +include_directories(../../src) +include_directories(/usr/include) + +include_directories(/usr/local/cuda/include) + +aux_source_directory(../../src/db db_srcs) +aux_source_directory(../../src/config config_files) +aux_source_directory(../../src/cache cache_srcs) +aux_source_directory(../../src/wrapper wrapper_src) + +link_directories("/usr/local/cuda/lib64") + +set(require_files + ../../src/license/License.cpp + ) + +cuda_add_executable(license_test + ${unittest_srcs} + ${config_files} + ${cache_srcs} + ${db_srcs} + ${require_files} + ) + +set(require_libs + libvecwise_engine.a + stdc++ + boost_system + boost_filesystem + pthread + snappy + bz2 + z + zstd + rocksdb + faiss + cudart + cublas + sqlite3 + lz4 + crypto + ) + +target_link_libraries(license_test + ${unittest_libs} + ${require_libs} + ${cuda_library} + ) \ No newline at end of file diff --git a/cpp/unittest/license/license_tests.cpp b/cpp/unittest/license/license_tests.cpp new file mode 100644 index 00000000..69595c01 --- /dev/null +++ b/cpp/unittest/license/license_tests.cpp @@ -0,0 +1,15 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved +// Unauthorized copying of this file, via any medium is strictly prohibited. +// Proprietary and confidential. +//////////////////////////////////////////////////////////////////////////////// +#include +#include "license/License.h" + +using namespace zilliz::vecwise::server; + +TEST(LicenseTest, LICENSE_TEST) { + std::string path1 = "/tmp/vecwise_engine.license"; + ServerError err = LicenseValidate(path1); + ASSERT_EQ(err, server::SERVER_SUCCESS); +} -- GitLab