diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index ef392fd8d..161321fa2 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -54,6 +54,8 @@ 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: print link.txt + run: cat build/CMakeFiles/bcos-c-sdk*.dir/link.txt - uses: actions/upload-artifact@v2 with: name: libbcos-c-sdk.dylib.zip @@ -97,6 +99,8 @@ jobs: run: cd build && make -j4 - name: run test run: cd build && CTEST_OUTPUT_ON_FAILURE=TRUE make test + - name: print link.txt + run: cat build/CMakeFiles/bcos-c-sdk*.dir/link.txt - name: run coverage run: cd build && make cov - name: upload coverage report @@ -165,6 +169,8 @@ jobs: make -j4 - name: run test run: cd build && CTEST_OUTPUT_ON_FAILURE=TRUE make test + - name: print link.txt + run: cat build/CMakeFiles/bcos-c-sdk*.dir/link.txt - uses: actions/upload-artifact@v2 with: name: libbcos-c-sdk.so.zip @@ -202,7 +208,7 @@ jobs: if: runner.os == 'Windows' run: | mkdir -p build && cd build - cmake -G "Visual Studio 16 2019" -A x64 ../ -DCMAKE_BUILD_TYPE=Release -DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN7 -D_WIN32_WINNT=0x0601 -DTESTS=ON -DBUILD_JNI=ON -DVCPKG_TARGET_TRIPLET='x64-windows-static' -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake + cmake -G "Visual Studio 16 2019" -A x64 ../ -DCMAKE_BUILD_TYPE=Release -DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN8 -D_WIN32_WINNT=0x0602 -DTESTS=ON -DBUILD_JNI=ON -DVCPKG_TARGET_TRIPLET='x64-windows-static' -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake - name: compile run: cd build && MSBuild bcos-c-sdk.sln /p:Configuration=Release /p:Platform=x64 - uses: actions/upload-artifact@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ff519b90..ab7f98b24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,8 +28,8 @@ if (NOT DEFINED URL_BASE) endif () if (WIN32) - add_definitions(-D_WIN32_WINNT=0x0601) - add_definitions(-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN7) + add_definitions(-D_WIN32_WINNT=0x0602) + add_definitions(-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN8) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS "ON") endif () @@ -46,6 +46,7 @@ if ("${ARCHITECTURE}" MATCHES "aarch64") set(ARCH_NATIVE ON) endif () +set(VCPKG_BUILD_TYPE "Release") if (NOT DEFINED CMAKE_TOOLCHAIN_FILE) find_package(Git REQUIRED) execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- vcpkg WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) @@ -58,7 +59,7 @@ project(bcos-c-sdk VERSION "3.6.0") # Debug, Release, RelWithDebInfo, MinSizeRel if (NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release) + set(CMAKE_BUILD_TYPE MinSizeRel) endif () # basic settings diff --git a/bindings/java/jni/src/main/c/CMakeLists.txt b/bindings/java/jni/src/main/c/CMakeLists.txt index ace0b0b3c..b1e593d82 100644 --- a/bindings/java/jni/src/main/c/CMakeLists.txt +++ b/bindings/java/jni/src/main/c/CMakeLists.txt @@ -21,6 +21,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() +if (WIN32) + add_definitions(-D_WIN32_WINNT=0x0602) + add_definitions(-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN8) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS "ON") +endif () + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index 403657515..98b309ae9 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -3,7 +3,7 @@ { "kind": "git", "repository": "https://github.com/kyonRay/registry", - "baseline": "8d37c1d05935bc5d5796c6e73da7b15d19da2e3f", + "baseline": "9e1640cf7e8f58d8026e31c82e0ab8c79fab1093", "packages": [ "openssl", "hsm-crypto",