diff --git a/.circleci/config.yml b/.circleci/config.yml index 559b0f4c6..a98e5f655 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -123,6 +123,9 @@ jobs: xcode_version: type: string default: "15.2.0" + deployment_target: + type: string + default: "" macos: xcode: << parameters.xcode_version >> resource_class: macos.m1.medium.gen1 @@ -209,6 +212,9 @@ jobs: xcode_version: type: string default: "15.2.0" + deployment_target: + type: string + default: "" build_env: type: string default: "" @@ -237,6 +243,7 @@ jobs: source env/bin/activate DEV_RELEASE=1 \ CMAKE_BUILD_PARALLEL_LEVEL=`sysctl -n hw.ncpu` \ + CMAKE_ARGS=-DCMAKE_OSX_DEPLOYMENT_TARGET=<< parameters.deployment_target >> \ pip install . -v - run: name: Generate package stubs @@ -250,6 +257,7 @@ jobs: source env/bin/activate << parameters.build_env >> \ CMAKE_BUILD_PARALLEL_LEVEL=`sysctl -n hw.ncpu` \ + CMAKE_ARGS=-DCMAKE_OSX_DEPLOYMENT_TARGET=<< parameters.deployment_target >> \ python -m build -w - when: condition: << parameters.build_env >> @@ -332,7 +340,13 @@ workflows: parameters: xcode_version: ["15.0.0", "15.2.0", "16.0.0"] - linux_build_and_test - - build_documentation + - build_documentation + - build_release: + matrix: + parameters: + python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + xcode_version: ["15.2.0"] + deployment_target: ["", "14.0"] build_pypi_release: when: @@ -387,7 +401,8 @@ workflows: matrix: parameters: python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - xcode_version: ["15.0.0", "15.2.0"] + xcode_version: ["15.2.0"] + deployment_target: ["", "14.0"] weekly_build: when: and: diff --git a/CMakeLists.txt b/CMakeLists.txt index 58ccd0a60..5963c8442 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(mlx LANGUAGES C CXX) # ----------------------------- Setup ----------------------------- set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_INSTALL_MESSAGE NEVER) @@ -223,13 +223,9 @@ target_include_directories( mlx PUBLIC $ $) -FetchContent_Declare( - fmt - GIT_REPOSITORY https://github.com/fmtlib/fmt.git - GIT_TAG 10.2.1 - EXCLUDE_FROM_ALL) -FetchContent_MakeAvailable(fmt) -target_link_libraries(mlx PRIVATE $) +# FetchContent_Declare( fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git +# GIT_TAG 10.2.1 EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(fmt) +# target_link_libraries(mlx PRIVATE $) if(MLX_BUILD_PYTHON_BINDINGS) message(STATUS "Building Python bindings.")