diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b50da3..ec06e29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,10 @@ project(llama_cpp) option(BUILD_LLAMA_CPP "Build llama.cpp shared library and install alongside python package" ON) +if (APPLE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") +endif() if (BUILD_LLAMA_CPP) set(BUILD_SHARED_LIBS "On")