Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #90 from sergeyklay/feature/arm64-build
Browse files Browse the repository at this point in the history
Provide support to build project under arm64/aarch64
  • Loading branch information
sergeyklay authored Aug 28, 2021
2 parents 269c452 + 98af2fb commit 35d699b
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ releases, in reverse chronological order.
* Added `-dumpversion` program option alias for `--dumpversion`.
* Amended tests.
* Provided launchd integration for macOS.

* Provided support to build project under arm64/aarch64 architectures.

### Bugfix

* [#87](https://github.com/sergeyklay/pcloud-console-client/issues/87):
Define `_FILE_OFFSET_BITS` to `64` on arm64 architectures.
For more info about this macro refer to
https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html.

### Changes

* Renamed `overlay_callback` pointer to function to `poverlay_callback`.
Expand Down
52 changes: 52 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,37 @@
"CMAKE_CXX_COMPILER": "c++",
"PCLOUD_TLS_IMPL": "mbedtls"
}
},
{
"name": "macos-armv8-apple-mbedtls-debug",
"displayName": "macOS armv8: Debug / Apple Clang / Mbed TLS",
"description": "Sets Ninja generator, Clang compiler, build and install directory, debug build type and Mbed TLS implementation",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"architecture": {
"value": "armv8",
"strategy": "external"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"PCLOUD_MAINTAINER_LOGS": true,
"PCLOUD_MAINTAINER_LOGS_LEVEL": "0",
"PCLOUD_MAINTAINER_LOG_FILE": "",
"PCLOUD_BUILD_DOC": true,
"PCLOUD_WITH_TESTS": true,
"PCLOUD_WITH_LAUNCHD": true,
"PCLOUD_WITH_SYSTEMD": false,
"PCLOUD_LAUNCHD_PLISTS_INSTALL_DIR": "${sourceDir}/out/install/${presetName}/Library/LaunchAgents",
"CMAKE_C_COMPILER": "cc",
"CMAKE_CXX_COMPILER": "c++",
"PCLOUD_TLS_IMPL": "mbedtls"
}
}
],
"buildPresets": [
Expand Down Expand Up @@ -114,6 +145,17 @@
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "macos-armv8-apple-mbedtls-debug",
"displayName": "macOS armv8: Debug / Apple Clang / Mbed TLS",
"configurePreset": "macos-armv8-apple-mbedtls-debug",
"configuration": "Debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
}
],
"testPresets": [
Expand Down Expand Up @@ -146,6 +188,16 @@
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "macos-armv8-apple-mbedtls-debug",
"displayName": "macOS armv8: Debug / Apple Clang / Mbed TLS",
"configurePreset": "macos-armv8-apple-mbedtls-debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
}
]
}
2 changes: 2 additions & 0 deletions cmake/FindFUSE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ if(FUSE_FOUND)
set(FUSE_DEFINITIONS "-D_REENTRANT -D_FILE_OFFSET_BITS=64")
elseif(sys_cpu MATCHES x86_64)
set(FUSE_DEFINITIONS "-D_REENTRANT -D_FILE_OFFSET_BITS=64")
elseif(sys_cpu MATCHES arm64)
set(FUSE_DEFINITIONS "-D_REENTRANT -D_FILE_OFFSET_BITS=64")
endif()
unset(sys_cpu)
endif()
Expand Down
15 changes: 15 additions & 0 deletions tools/conan/profiles/macos-armv8-apple-12-debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[settings]
os=Macos
os_build=Macos
arch=armv8
arch_build=armv8
compiler=apple-clang
compiler.version=12.0
compiler.libcxx=libc++
build_type=Debug

[options]

[build_requires]

[env]

0 comments on commit 35d699b

Please sign in to comment.