[R-pkg-devel] MacOS CMAKE_OSX_ARCHITECTURES

Florian Schwendinger F|or|@nSchwend|nger @end|ng |rom gmx@@t
Mon Sep 5 16:27:21 CEST 2022


Dear package developers,

I currently try to debug a few issues which occur on MacOS
r-release-macos-arm64 and r-oldrel-macos-arm64.

To the setting I wrote an interface to mixed integer linear optimization
solver highs. Thereby I use the configure script + a bash file called
from configure to build a static library to which I link afterwards.

For MacOS M1 this was a little bit tricky since I needed to add the
CMAKE_OSX_ARCHITECTURES flag to get it to work (I have no direct access to MacOS M1).
What I currently doing for MacOS-M1 is
${CMAKE_EXE} \
-DCMAKE_INSTALL_PREFIX=${R_HIGHS_LIB_DIR} \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ..

As far as I understand from the cmake release page
https://cmake.org/cmake/help/latest/release/3.19.html#id13
which states
"The precompiled macOS binary provided on cmake.org is now a universal
binary with x86_64 and arm64 architectures."
for this to work I need at least cmake version "3.19.2"?
Is this correct?
Is there a better way / another option?


I used for MacOS-M1 the minimum cmake version "3.20" since
this is the version I could test with a testing service.
Now seeing the error messages on
"r-release-macos-arm64" and "r-oldrel-macos-arm64"
I see these two setups use cmake "3.19.4" which means
I should have stuck to "3.19.2" if my assumption above is
correct. Is it possible to see beforehand what the highest
possible cmake version for CRAN is?

Best regards,
Florian
 
 



More information about the R-package-devel mailing list