Skip to content

Commit

Permalink
ci: disable thrift on arm
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-para committed Oct 11, 2023
1 parent 89bf891 commit 7d45a7a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ include(${PROJECT_SOURCE_DIR}/cmake/config.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
# include(${PROJECT_SOURCE_DIR}/cmake/nuget.cmake)
if(WITH_THRIFT)

if(WITH_THRIFT AND NOT MAA_CROSSCOMPILE)
include(${PROJECT_SOURCE_DIR}/cmake/thrift-gen.cmake)
endif()
if(WITH_GRPC)
Expand All @@ -34,7 +35,7 @@ find_package(Boost REQUIRED COMPONENTS system)
find_package(ZLIB REQUIRED)
find_package(fastdeploy_ppocr REQUIRED)
find_package(ONNXRuntime)
if(WITH_THRIFT)
if(WITH_THRIFT AND NOT MAA_CROSSCOMPILE)
find_package(Thrift CONFIG REQUIRED)
endif()
if(WITH_GRPC)
Expand Down
2 changes: 1 addition & 1 deletion cmake/thrift-gen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ macro(GENERATE_THRIFT_LIB LIB_NAME FILENAME OUTPUTDIR SOURCES)
execute_process(COMMAND ${THRIFT_COMPILER} --gen cpp:no_skeleton -out ${OUTPUTDIR} ${FILENAME}
RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
message("Error generating ${FILENAME} with generator ${GENERATOR}")
message(FATAL_ERROR "Error generating ${FILENAME} with generator ${GENERATOR}")
endif()
file(GLOB_RECURSE GENERATED_SOURCES ${OUTPUTDIR}/*.cpp)
add_library(${LIB_NAME} STATIC ${GENERATED_SOURCES})
Expand Down
6 changes: 6 additions & 0 deletions cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ if(NOT DEFINED MAADEPS_TRIPLET)
detect_maadeps_triplet(MAADEPS_TRIPLET)
endif()
set(MAADEPS_TARGET_TOOLS ${PROJECT_SOURCE_DIR}/MaaDeps/vcpkg/installed/${MAADEPS_TRIPLET}/tools)

if(maa-${MAADEPS_HOST_TRIPLET} STREQUAL ${MAADEPS_TRIPLET})
set(MAA_CROSSCOMPILE OFF)
else()
set(MAA_CROSSCOMPILE ON)
endif()
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_subdirectory(MaaUtils)
add_subdirectory(MaaControlUnit)
if(WITH_THRIFT)
if(WITH_THRIFT AND NOT MAA_CROSSCOMPILE)
add_subdirectory(MaaThriftController)
endif(WITH_THRIFT)
if(WITH_GRPC)
Expand Down

0 comments on commit 7d45a7a

Please sign in to comment.