Skip to content

Commit f93fb30

Browse files
committed
Set native arch flags for macos
1 parent 685a929 commit f93fb30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ project(llama_cpp)
44

55
option(BUILD_LLAMA_CPP "Build llama.cpp shared library and install alongside python package" ON)
66

7+
if (APPLE)
8+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
9+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
10+
endif()
711

812
if (BUILD_LLAMA_CPP)
913
set(BUILD_SHARED_LIBS "On")

0 commit comments

Comments
 (0)