From e1f0de2fa184345cb675c5f898792ed8c5bb3dca Mon Sep 17 00:00:00 2001 From: Spencer Sutton Date: Sat, 10 Jun 2023 11:17:18 -0400 Subject: [PATCH] Move add_library(llama, ...) to above first_use --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84e2a88cb..529577a3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,6 +202,12 @@ if (LLAMA_CUBLAS) endif() endif() +add_library(llama + llama.cpp + llama.h + llama-util.h + ) + if (LLAMA_METAL) find_library(FOUNDATION_LIBRARY Foundation REQUIRED) find_library(METAL_FRAMEWORK Metal REQUIRED) @@ -419,11 +425,7 @@ if (BUILD_SHARED_LIBS) set_target_properties(ggml PROPERTIES POSITION_INDEPENDENT_CODE ON) endif() -add_library(llama - llama.cpp - llama.h - llama-util.h - ) + target_include_directories(llama PUBLIC .) target_compile_features(llama PUBLIC cxx_std_11) # don't bump