diff --git a/ggml/include/ggml-cpp.h b/ggml/include/ggml-cpp.h index 45af74d40..219361af4 100644 --- a/ggml/include/ggml-cpp.h +++ b/ggml/include/ggml-cpp.h @@ -1,15 +1,16 @@ #pragma once -#include "ggml.h" -#include "ggml-alloc.h" -#include "ggml-backend.h" - #ifndef __cplusplus #error "This header is for C++ only" #endif +#include "ggml.h" +#include "ggml-alloc.h" +#include "ggml-backend.h" #include +// Smart pointers for ggml types + // ggml struct ggml_context_deleter { void operator()(ggml_context * ctx) { ggml_free(ctx); } }; diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index 915568798..c9b685cab 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -1368,6 +1368,7 @@ add_library(ggml ../include/ggml.h ../include/ggml-alloc.h ../include/ggml-backend.h + ../include/ggml-cpp.h ggml.c ggml-alloc.c ggml-backend.cpp