From 80c886ce98a877f7bcf1e12e37e9dd872445e4ae Mon Sep 17 00:00:00 2001 From: Giuseppe Sorrentino Date: Wed, 28 Feb 2024 18:16:12 +0100 Subject: [PATCH 1/3] apple silicon build fix --- .github/workflows/ccpp_mac_arm.yml | 2 +- .github/workflows/ccpp_mac_arm_debug.yml | 2 +- .github/workflows/ccpp_mac_arm_rc.yml | 2 +- CMakeLists.txt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ccpp_mac_arm.yml b/.github/workflows/ccpp_mac_arm.yml index 710e70a29e1..090671cc17d 100644 --- a/.github/workflows/ccpp_mac_arm.yml +++ b/.github/workflows/ccpp_mac_arm.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: macos-11 + runs-on: macos-14 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ccpp_mac_arm_debug.yml b/.github/workflows/ccpp_mac_arm_debug.yml index eabd6ecd364..10b4e1ce387 100644 --- a/.github/workflows/ccpp_mac_arm_debug.yml +++ b/.github/workflows/ccpp_mac_arm_debug.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: macos-11 + runs-on: macos-14 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/ccpp_mac_arm_rc.yml b/.github/workflows/ccpp_mac_arm_rc.yml index 9cc5bd1df7c..5b68de5f80c 100644 --- a/.github/workflows/ccpp_mac_arm_rc.yml +++ b/.github/workflows/ccpp_mac_arm_rc.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: macos-11 + runs-on: macos-14 steps: - uses: actions/checkout@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 18f26baf813..a112949bba4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,6 +206,7 @@ if(WIN32) endif() if (APPLE) + add_compile_options(-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) message("OS X SDK Path: ${CMAKE_OSX_SYSROOT}") if (CMAKE_OSX_DEPLOYMENT_TARGET) message("OS X Deployment Target: ${CMAKE_OSX_DEPLOYMENT_TARGET}") From 976d56912dbc3b6c0ef9545f8476147e4b5bd69a Mon Sep 17 00:00:00 2001 From: Giuseppe Sorrentino Date: Thu, 29 Feb 2024 11:38:01 +0100 Subject: [PATCH 2/3] apple silicon build test --- .github/workflows/debug_mac_arm.yml | 26 ++++++++++++++++++++++++++ deps/TIFF/TIFF.cmake | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/debug_mac_arm.yml diff --git a/.github/workflows/debug_mac_arm.yml b/.github/workflows/debug_mac_arm.yml new file mode 100644 index 00000000000..b66c41e9b2c --- /dev/null +++ b/.github/workflows/debug_mac_arm.yml @@ -0,0 +1,26 @@ +name: C/C++ debug arm macos + +on: + push: + branches: + - pr1 + +jobs: + build: + + runs-on: macos-14 + + steps: + - uses: actions/checkout@v2 + - name: build deps & slicer + run: ./BuildMacOS.sh -ia + - name: Upload artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: nightly_macos_arm_debug.dmg + path: build/${{ github.event.repository.name }}.dmg + - name: Upload artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: nightly_arm_macos.tar + path: build/${{ github.event.repository.name }}.tar diff --git a/deps/TIFF/TIFF.cmake b/deps/TIFF/TIFF.cmake index d8ef178b182..3948239fb30 100644 --- a/deps/TIFF/TIFF.cmake +++ b/deps/TIFF/TIFF.cmake @@ -6,7 +6,7 @@ if (APPLE) if (${CMAKE_OSX_ARCHITECTURES} MATCHES "arm") prusaslicer_add_cmake_project(TIFF URL https://gitlab.com/libtiff/libtiff/-/archive/v4.3.0/libtiff-v4.3.0.zip - URL_HASH SHA256=a1db6826ea1b8b08eaf168973abb29b8a143fb744c1b24cc6967cb12f5e6e81f + URL_HASH SHA256=4fca1b582c88319f3ad6ecd5b46320eadaf5eb4ef6f6c32d44caaae4a03d0726 DEPENDS ${ZLIB_PKG} ${PNG_PKG} dep_JPEG CMAKE_ARGS -Dlzma:BOOL=OFF From c658aef9622e48fad7147d3d5fdaa2d66dce2d65 Mon Sep 17 00:00:00 2001 From: Giuseppe Sorrentino Date: Fri, 1 Mar 2024 12:56:02 +0100 Subject: [PATCH 3/3] apple silicon build test with b flag --- .github/workflows/debug_mac_arm.yml | 2 +- cmake/modules/FindNLopt.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debug_mac_arm.yml b/.github/workflows/debug_mac_arm.yml index b66c41e9b2c..39ba96e829c 100644 --- a/.github/workflows/debug_mac_arm.yml +++ b/.github/workflows/debug_mac_arm.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: build deps & slicer - run: ./BuildMacOS.sh -ia + run: ./BuildMacOS.sh -bia - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/cmake/modules/FindNLopt.cmake b/cmake/modules/FindNLopt.cmake index 912ce8d30a3..d5ab8ec420c 100644 --- a/cmake/modules/FindNLopt.cmake +++ b/cmake/modules/FindNLopt.cmake @@ -28,7 +28,7 @@ if(NOT NLopt_DIR) set(NLopt_FOUND TRUE) - set(_NLopt_LIB_NAMES "nlopt") + set(_NLopt_LIB_NAMES "nlopt" "nloptd") find_library(NLopt_LIBS NAMES ${_NLopt_LIB_NAMES}) if(NOT NLopt_LIBS)