aliyun / aliyun-oss-cpp-sdk

Aliyun OSS SDK for C++
Other
188 stars 88 forks source link

在M1的Mac上cmake编译x86_64是否有Bug #118

Open liwx opened 2 years ago

liwx commented 2 years ago

我在m1的mac上编译x86_64时,出现了错误,于是看了cmakelist.txt文件,怀疑是不是这里的问题,报错在43行,” "Do not support target platform“


#Platform
if (CMAKE_CROSSCOMPILING)
    if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
        set(PLATFORM_ANDROID 1)
        set(TARGET_OS "ANDROID")
    else()
        message(FATAL_ERROR "Do not support target platform")
    endif()
else()
    if(CMAKE_HOST_APPLE)
        set(PLATFORM_APPLE 1)
        set(TARGET_OS "APPLE")
    elseif(CMAKE_HOST_UNIX)
        set(PLATFORM_LINUX 1)
        set(TARGET_OS "LINUX")
    elseif(CMAKE_HOST_WIN32)
        set(PLATFORM_WINDOWS 1)
        set(TARGET_OS "WINDOWS")
    else()
        message(FATAL_ERROR "Do not support unknown host OS")
    endif()
endif()

我的报错提示为: CMake Error at src/CMakeLists.txt:43 (message): Do not support target platform