diff --git a/CMakeLists.txt b/CMakeLists.txt index ab8aea443..4bf8d2d3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,6 +231,9 @@ target_include_directories( mlx PUBLIC $ $) +# Do not add mlx_EXPORTS define for shared library. +set_target_properties(mlx PROPERTIES DEFINE_SYMBOL "") + FetchContent_Declare( fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git diff --git a/mlx/backend/cuda/CMakeLists.txt b/mlx/backend/cuda/CMakeLists.txt index d62a69846..7ebe68324 100644 --- a/mlx/backend/cuda/CMakeLists.txt +++ b/mlx/backend/cuda/CMakeLists.txt @@ -16,8 +16,6 @@ target_sources( ${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp ${CMAKE_CURRENT_SOURCE_DIR}/worker.cpp) -target_compile_definitions(mlx PUBLIC MLX_USE_CUDA) - # Enable defining device lambda functions. target_compile_options(mlx PRIVATE "$<$:--extended-lambda>")