From bae82824fbcbe558e52ebf8bad5597930d161eef Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Tue, 18 Feb 2025 14:02:35 -0500 Subject: [PATCH] WIP: working fmt dep Signed-off-by: Jared Van Bortel --- deps/CMakeLists.txt | 1 + gpt4all-backend/CMakeLists.txt | 1 + gpt4all-backend/deps/CMakeLists.txt | 2 +- gpt4all-backend/src/main.cpp | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 3d30464c..acb77cff 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -1,6 +1,7 @@ set(BUILD_SHARED_LIBS OFF) set(FMT_INSTALL OFF) +set(FMT_MODULE ON) add_subdirectory(fmt) add_subdirectory(json) diff --git a/gpt4all-backend/CMakeLists.txt b/gpt4all-backend/CMakeLists.txt index 0f9e9b16..afcd62bc 100644 --- a/gpt4all-backend/CMakeLists.txt +++ b/gpt4all-backend/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.29) project(gpt4all-backend VERSION 0.1 LANGUAGES CXX) +set(CMAKE_CXX_STANDARD 23) # make sure fmt module is compiled with the same C++ version as us include(../common/common.cmake) find_package(Qt6 6.8 COMPONENTS Core REQUIRED) diff --git a/gpt4all-backend/deps/CMakeLists.txt b/gpt4all-backend/deps/CMakeLists.txt index ca433bc3..7828a22b 100644 --- a/gpt4all-backend/deps/CMakeLists.txt +++ b/gpt4all-backend/deps/CMakeLists.txt @@ -1,5 +1,5 @@ add_library(ollama-hpp INTERFACE) -target_include_directories(ollama-hpp INTERFACE +target_include_directories(ollama-hpp SYSTEM INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/ollama-hpp/include" ) target_link_libraries(ollama-hpp INTERFACE diff --git a/gpt4all-backend/src/main.cpp b/gpt4all-backend/src/main.cpp index 8f44d857..386cdda6 100644 --- a/gpt4all-backend/src/main.cpp +++ b/gpt4all-backend/src/main.cpp @@ -8,8 +8,11 @@ module; module gpt4all.backend.main; +import fmt; + std::string LLMProvider::qstringToSTL(const QString &s) { + fmt::format("{}", "foo"); return s.toStdString(); }