misc(cmake): remove dependency on fmt

This commit is contained in:
Morgan Funtowicz 2024-11-08 00:53:53 +01:00
parent 26d0266cec
commit cf17928f83
5 changed files with 4 additions and 12 deletions

View File

@ -19,7 +19,6 @@ else ()
endif ()
# Add dependencies
include(cmake/fmt.cmake)
include(cmake/spdlog.cmake)
if (${LLAMA_CPP_BUILD_CUDA})

View File

@ -99,10 +99,10 @@ fn main() {
println!("cargo:rustc-link-search=native={}", out_dir.display());
if is_debug {
println!("cargo:rustc-link-lib=dylib=fmtd");
// println!("cargo:rustc-link-lib=dylib=fmtd");
println!("cargo:rustc-link-lib=dylib=spdlogd");
} else {
println!("cargo:rustc-link-lib=dylib=fmt");
// println!("cargo:rustc-link-lib=dylib=fmt");
println!("cargo:rustc-link-lib=dylib=spdlog");
}

View File

@ -1,5 +0,0 @@
FetchContent_Declare(
fmt
URL https://github.com/fmtlib/fmt/archive/refs/tags/11.0.2.tar.gz
)
FetchContent_MakeAvailable(fmt)

View File

@ -1,6 +1,6 @@
set(SPDLOG_USE_FMT ON)
set(SPDLOG_BUILD_SHARED ON)
set(SPDLOG_FMT_EXTERNAL ON)
set(SPDLOG_FMT_EXTERNAL OFF)
# Define the level at which SPDLOG_ compilation level is defined
if (CMAKE_BUILD_TYPE STREQUAL "Debug")

View File

@ -7,9 +7,7 @@
#include <ggml.h>
#include <llama.h>
#include <fmt/chrono.h>
#include <fmt/format.h>
#include <fmt/std.h>
#include <spdlog/fmt/chrono.h>
#include <spdlog/spdlog.h>
#include "backend.hpp"