Set native arch flags for macos

This commit is contained in:
Andrei Betlen 2023-09-12 17:15:07 -04:00
parent 685a929c6a
commit f93fb30f5c

View file

@ -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")