Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull committed Sep 13, 2024
1 parent 126e295 commit 344d83d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cpp/cmake/BuildInfo.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function(create_build_info)
# Set build platform; to be written to BuildInfo.h
set(PPC_BUILD_OS "${CMAKE_SYSTEM_NAME}")
set(PPC_BUILD_OS "${CMAKE_HOST_SYSTEM_NAME}")

if (CMAKE_COMPILER_IS_MINGW)
set(PPC_BUILD_COMPILER "mingw")
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake/CompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
add_compile_options(-fstack-protector)
add_compile_options(-Winconsistent-missing-override)
# Some Linux-specific Clang settings. We don't want these for OS X.
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
if ("${CMAKE_HOST_SYSTEM_NAME}" MATCHES "Linux")
# Tell Boost that we're using Clang's libc++. Not sure exactly why we need to do.
add_definitions(-DBOOST_ASIO_HAS_CLANG_LIBCXX)
# Use fancy colors in the compiler diagnostics
Expand Down
5 changes: 3 additions & 2 deletions cpp/cmake/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ macro(configure_project)
if (${SUPPORTED_INSTRUCTIONS} MATCHES ".*SSE4.2.*")
set(ENABLE_SSE ON)
endif ()
elseif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
elseif(NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
# detect sse4_2
FILE(READ "/proc/cpuinfo" SUPPORTED_INSTRUCTIONS)
message("* Linux SUPPORTED_INSTRUCTIONS: ${SUPPORTED_INSTRUCTIONS}")
if (${SUPPORTED_INSTRUCTIONS} MATCHES ".*sse4_2.*")
set(ENABLE_SSE ON)
endif ()
Expand Down Expand Up @@ -164,7 +165,7 @@ macro(print_config NAME)
message("-- CMAKE_BUILD_TYPE Build type ${CMAKE_BUILD_TYPE}")
message("-- VCPKG_MANIFEST_FEATURES VCPKG manifest features ${VCPKG_MANIFEST_FEATURES}")
message("-- CMAKE_TOOLCHAIN_FILE Cmake toolchain file ${CMAKE_TOOLCHAIN_FILE}")
message("-- TARGET_PLATFORM Target platform ${CMAKE_SYSTEM_NAME} ${ARCHITECTURE}")
message("-- TARGET_PLATFORM Target platform ${CMAKE_HOST_SYSTEM_NAME} ${ARCHITECTURE}")
message("-- BUILD_STATIC Build static ${BUILD_STATIC}")
message("-- COVERAGE Build code coverage ${COVERAGE}")
message("-- TESTS Build tests ${TESTS}")
Expand Down
6 changes: 3 additions & 3 deletions cpp/vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"registries": [
{
"kind": "git",
"repository": "https://github.com/cyjseagull/registry",
"baseline": "6160f4167d4ab801f16a18bdd842a75edf7b069e",
"repository": "https://github.com/FISCO-BCOS/registry",
"baseline": "b483a0287c6ee7017983942af540e3ee672b0994",
"packages": [
"openssl",
"bcos-utilities",
Expand All @@ -13,4 +13,4 @@
]
}
]
}
}
10 changes: 7 additions & 3 deletions cpp/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
{
"name": "libhdfs3",
"version": "2024-04-27"
"version": "2024-04-27#1"
},
{
"name": "tbb",
Expand Down Expand Up @@ -98,7 +98,11 @@
"name": "grpc",
"version>=": "1.51.1"
},
"libhdfs3",
{
"name": "libhdfs3",
"version>=": "2024-04-27#1",
"features": ["sse"]
},
"tarscpp",
"tbb",
"libxml2"
Expand All @@ -121,4 +125,4 @@
]
}
}
}
}

0 comments on commit 344d83d

Please sign in to comment.