mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-29 04:51:13 +08:00
Testing C++ 20
This commit is contained in:
parent
f288db8d34
commit
e300a01f4a
@ -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:
|
||||
|
@ -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 $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
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 $<BUILD_INTERFACE:fmt::fmt-header-only>)
|
||||
# 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 $<BUILD_INTERFACE:fmt::fmt-header-only>)
|
||||
|
||||
if(MLX_BUILD_PYTHON_BINDINGS)
|
||||
message(STATUS "Building Python bindings.")
|
||||
|
Loading…
Reference in New Issue
Block a user