Skip to content

Commit

Permalink
Merge pull request #1573 from robotology/fixmanualskipace
Browse files Browse the repository at this point in the history
Pass SKIP_ACE to YARP on macOS if using Apple Silicon
  • Loading branch information
traversaro authored Jan 30, 2024
2 parents 5831281 + 0836a7a commit 0c0d981
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
11 changes: 10 additions & 1 deletion cmake/BuildYARP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ else()
set(YARP_COMPILE_BINDINGS OFF)
endif()


if (APPLE OR WIN32)
set(ENABLE_USBCAMERA OFF)
else()
Expand All @@ -39,6 +38,16 @@ if(ROBOTOLOGY_USES_PYTHON)
list(APPEND YARP_OPTIONAL_DEPS "-DCMAKE_INSTALL_PYTHON3DIR=${ROBOTOLOGY_SUPERBUILD_PYTHON_INSTALL_DIR}")
endif()

# Workaround for ace not available on arm64 on Apple in conda-forge, see
# https://github.com/robotology/robotology-superbuild/issues/916
# https://github.com/conda-forge/ace-feedstock/issues/29
# See https://github.com/conda-forge/sleef-feedstock/blob/7fa2b0e5c9d9a10165809b4bb73a5840d72d0cdc/recipe/patches/353.patch#L6
# for the logic of detecting arm builds on Apple
if(ROBOTOLOGY_CONFIGURING_UNDER_CONDA AND APPLE
AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64")
list(APPEND YARP_OPTIONAL_CMAKE_ARGS "-DSKIP_ACE:BOOL=ON")
endif()

ycm_ep_helper(YARP TYPE GIT
STYLE GITHUB
REPOSITORY robotology/yarp.git
Expand Down
26 changes: 0 additions & 26 deletions doc/conda-forge.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,32 +191,6 @@ cmake ..
cmake --build . --config Release
~~~

On **macOS** with a *recent* (as per 2022/2023) ARM-based processor, because of https://github.com/robotology/robotology-superbuild/issues/916, the procedure is slightly different:
~~~
cd robotology-superbuild
mkdir build
cd build
cmake ..
cmake --build . --config Release
~~~
At this point, you will get the error message
~~~
CMake Error at cmake/YarpFindDependencies.cmake:187 (message):
Optional package ACE not found. Please install it or enable the option
"SKIP_ACE" to build yarp.
Call Stack (most recent call first):
cmake/YarpFindDependencies.cmake:703 (check_skip_dependency)
CMakeLists.txt:60 (include)
~~~
So, do the following steps
~~~
cd src/YARP
cmake -DSKIP_ACE:BOOL=ON .
cd ..
cd ..
cmake --build . --config Release
~~~

On **Windows**, run:
~~~
cd robotology-superbuild
Expand Down

0 comments on commit 0c0d981

Please sign in to comment.