diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e434f0643..ed1cfaaea 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -54,8 +54,6 @@ jobs: run: export CFLAGS="${CFLAGS} -fPIC";export CXXFLAGS="${CXXFLAGS} -fPIC"; cd build && make -j4 - name: run test run: cd build && CTEST_OUTPUT_ON_FAILURE=TRUE make test - - name: run coverage - run: cd build && make cov - uses: actions/upload-artifact@v2 with: name: libbcos-c-sdk.dylib.zip diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e6f6225b..4db1fce9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,12 +23,16 @@ set(CMAKE_CXX_STANDARD 20) #set(CMAKE_OSX_DEPLOYMENT_TARGET "13" CACHE STRING "Minimum OS X deployment version") # URL_BASE download domain name -include(FetchContent) - if (NOT DEFINED URL_BASE) set(URL_BASE "github.com") endif () +if (WIN32) + add_definitions(-D_WIN32_WINNT=0x0601) + add_definitions(-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN7) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS "ON") +endif () + set(JAVA_SDK_JNI_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake" CACHE PATH "The cmake path for the library") # list(APPEND CMAKE_MODULE_PATH ${BCOS_CMAKE_SCRIPTS_DIR}) @@ -69,7 +73,7 @@ include(InstallInclude) include(IncludeDirectories) include(GNUInstallDirs) -find_package(Boost COMPONENTS log serialization unit_test_framework) +find_package(Boost COMPONENTS log_setup log serialization chrono system filesystem thread iostreams unit_test_framework) find_package(OpenSSL REQUIRED) find_package(Microsoft.GSL CONFIG REQUIRED) find_package(fmt REQUIRED) @@ -104,11 +108,11 @@ endif () add_library(${BCOS_C_SDK_STATIC_TARGET} ${SOURCES}) target_include_directories(${BCOS_C_SDK_STATIC_TARGET} PUBLIC $ $) -target_link_libraries(${BCOS_C_SDK_STATIC_TARGET} PUBLIC Boost::log fiscobcos::bcos-cpp-sdk) +target_link_libraries(${BCOS_C_SDK_STATIC_TARGET} PUBLIC Boost::log_setup Boost::log fiscobcos::bcos-cpp-sdk) add_library(${BCOS_C_SDK_TARGET} SHARED ${SOURCES}) target_include_directories(${BCOS_C_SDK_TARGET} PUBLIC $ $) -target_link_libraries(${BCOS_C_SDK_TARGET} PUBLIC Boost::log fiscobcos::bcos-cpp-sdk) +target_link_libraries(${BCOS_C_SDK_TARGET} PUBLIC Boost::log_setup Boost::log fiscobcos::bcos-cpp-sdk) add_dependencies(${BCOS_C_SDK_STATIC_TARGET} BuildInfo.h) add_dependencies(${BCOS_C_SDK_TARGET} BuildInfo.h)