Skip to content

Commit b4c47a3

Browse files
committed
Make llama work with MinGW 8.1.0.
1 parent f5ef5cf commit b4c47a3

File tree

32 files changed

+98
-44
lines changed

32 files changed

+98
-44
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "compat/mingw"]
2+
path = compat/mingw
3+
url = https://github.com/meganz/mingw-std-threads

CMakeLists.txt

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
cmake_minimum_required(VERSION 3.12) # Don't bump this version for no reason
1+
# 3.13 is required for target_link_libraries.
2+
# Don't bump this version for no reason.
3+
cmake_minimum_required(VERSION 3.13)
4+
25
project("llama.cpp" C CXX)
36

47
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@@ -58,12 +61,12 @@ option(LLAMA_SANITIZE_ADDRESS "llama: enable address sanitizer"
5861
option(LLAMA_SANITIZE_UNDEFINED "llama: enable undefined sanitizer" OFF)
5962

6063
# instruction set specific
61-
option(LLAMA_AVX "llama: enable AVX" ON)
62-
option(LLAMA_AVX2 "llama: enable AVX2" ON)
64+
option(LLAMA_AVX "llama: enable AVX" OFF)
65+
option(LLAMA_AVX2 "llama: enable AVX2" OFF)
6366
option(LLAMA_AVX512 "llama: enable AVX512" OFF)
6467
option(LLAMA_AVX512_VBMI "llama: enable AVX512-VBMI" OFF)
6568
option(LLAMA_AVX512_VNNI "llama: enable AVX512-VNNI" OFF)
66-
option(LLAMA_FMA "llama: enable FMA" ON)
69+
option(LLAMA_FMA "llama: enable FMA" OFF)
6770
# in MSVC F16C is implied with AVX2/AVX512
6871
if (NOT MSVC)
6972
option(LLAMA_F16C "llama: enable F16C" ON)
@@ -74,7 +77,7 @@ option(LLAMA_ACCELERATE "llama: enable Accelerate framework
7477
option(LLAMA_BLAS "llama: use BLAS" OFF)
7578
set(LLAMA_BLAS_VENDOR "Generic" CACHE STRING "llama: BLAS library vendor")
7679
option(LLAMA_CUBLAS "llama: use CUDA" OFF)
77-
#option(LLAMA_CUDA_CUBLAS "llama: use cuBLAS for prompt processing" OFF)
80+
#option(LLAMA_CUDA_CUBLAS "llama: use cuBLAS for prompt processing" OFF)
7881
option(LLAMA_CUDA_FORCE_DMMV "llama: use dmmv instead of mmvq CUDA kernels" OFF)
7982
set(LLAMA_CUDA_DMMV_X "32" CACHE STRING "llama: x stride for dmmv CUDA kernels")
8083
set(LLAMA_CUDA_MMV_Y "1" CACHE STRING "llama: y block size for mmv CUDA kernels")
@@ -83,16 +86,17 @@ set(LLAMA_CUDA_KQUANTS_ITER "2" CACHE STRING "llama: iters./thread per block for
8386
set(LLAMA_CUDA_PEER_MAX_BATCH_SIZE "128" CACHE STRING
8487
"llama: max. batch size for using peer access")
8588
option(LLAMA_HIPBLAS "llama: use hipBLAS" OFF)
89+
option(LLAMA_MINGW_COMPAT "llama: use MinGW compatibility headers" OFF)
8690
option(LLAMA_CLBLAST "llama: use CLBlast" OFF)
8791
option(LLAMA_METAL "llama: use Metal" ${LLAMA_METAL_DEFAULT})
8892
option(LLAMA_METAL_NDEBUG "llama: disable Metal debugging" OFF)
8993
option(LLAMA_MPI "llama: use MPI" OFF)
9094
option(LLAMA_K_QUANTS "llama: use k-quants" ON)
9195
option(LLAMA_QKK_64 "llama: use super-block size of 64 for k-quants" OFF)
9296

93-
option(LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE})
94-
option(LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE})
95-
option(LLAMA_BUILD_SERVER "llama: build server example" ON)
97+
option(LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE})
98+
option(LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE})
99+
option(LLAMA_BUILD_SERVER "llama: build server example" ON)
96100

97101
#
98102
# Build info header
@@ -627,6 +631,9 @@ endif()
627631
if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
628632
add_compile_definitions(_BSD_SOURCE)
629633
endif()
634+
if ((MINGW) AND (LLAMA_MINGW_COMPAT))
635+
add_compile_definitions(_USE_MINGW_COMPAT)
636+
endif()
630637

631638
#
632639
# libraries
@@ -674,6 +681,10 @@ add_library(llama
674681
)
675682

676683
target_include_directories(llama PUBLIC .)
684+
if (MINGW AND LLAMA_MINGW_COMPAT)
685+
include_directories(PRIVATE ${CMAKE_SOURCE_DIR}/compat/mingw)
686+
endif()
687+
677688
target_compile_features(llama PUBLIC cxx_std_11) # don't bump
678689
target_link_libraries(llama PRIVATE
679690
ggml
@@ -728,10 +739,10 @@ set(GGML_PUBLIC_HEADERS "ggml.h"
728739
"${GGML_HEADERS_METAL}" "${GGML_HEADERS_MPI}" "${GGML_HEADERS_EXTRA}")
729740

730741
set_target_properties(ggml PROPERTIES PUBLIC_HEADER "${GGML_PUBLIC_HEADERS}")
731-
install(TARGETS ggml PUBLIC_HEADER)
742+
install(TARGETS ggml PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
732743

733744
set_target_properties(llama PROPERTIES PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/llama.h)
734-
install(TARGETS llama LIBRARY PUBLIC_HEADER)
745+
install(TARGETS llama PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
735746

736747
install(
737748
FILES convert.py

common/common.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@
1010
#include <string>
1111
#include <vector>
1212
#include <random>
13-
#include <thread>
1413
#include <unordered_map>
1514
#include <tuple>
1615

16+
#if defined(__MINGW32__) && defined(_USE_MINGW_COMPAT)
17+
#include <mingw.thread.h>
18+
#else
19+
#include <thread>
20+
#endif
21+
1722
#ifdef _WIN32
1823
#define DIRECTORY_SEPARATOR '\\'
1924
#else

common/log.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
#include <cstring>
55
#include <sstream>
66
#include <iostream>
7-
#include <thread>
87
#include <vector>
98
#include <algorithm>
109
#include <cinttypes>
1110

11+
#if defined(__MINGW32__) && defined(_USE_MINGW_COMPAT)
12+
#include <mingw.thread.h>
13+
#else
14+
#include <thread>
15+
#endif
16+
1217
// --------------------------------
1318
//
1419
// Basic usage:

compat/mingw

Submodule mingw added at c931bac

examples/baby-llama/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET baby-llama)
22
add_executable(${TARGET} baby-llama.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/batched/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET batched)
22
add_executable(${TARGET} batched.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/beam-search/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET beam-search)
22
add_executable(${TARGET} beam-search.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/benchmark/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET benchmark)
22
add_executable(${TARGET} benchmark-matmult.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE llama ${CMAKE_THREAD_LIBS_INIT})
55
target_include_directories(${TARGET} PRIVATE ../../common)
66
target_compile_features(${TARGET} PRIVATE cxx_std_11)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET convert-llama2c-to-ggml)
22
add_executable(${TARGET} convert-llama2c-to-ggml.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/embd-input/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET embdinput)
22
add_library(${TARGET} embd-input-lib.cpp embd-input.h)
3-
install(TARGETS ${TARGET} LIBRARY)
3+
install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)
66
if(TARGET BUILD_INFO)
@@ -9,7 +9,7 @@ endif()
99

1010
set(TARGET embd-input-test)
1111
add_executable(${TARGET} embd-input-test.cpp)
12-
install(TARGETS ${TARGET} RUNTIME)
12+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
1313
target_link_libraries(${TARGET} PRIVATE common llama embdinput ${CMAKE_THREAD_LIBS_INIT})
1414
target_compile_features(${TARGET} PRIVATE cxx_std_11)
1515
if(TARGET BUILD_INFO)

examples/embedding/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET embedding)
22
add_executable(${TARGET} embedding.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)
66
if(TARGET BUILD_INFO)

examples/export-lora/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET export-lora)
22
add_executable(${TARGET} export-lora.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/finetune/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET finetune)
22
add_executable(${TARGET} finetune.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/gguf/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET gguf)
22
add_executable(${TARGET} gguf.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/llama-bench/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET llama-bench)
22
add_executable(${TARGET} llama-bench.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)
66
if(TARGET BUILD_INFO)

examples/main/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET main)
22
add_executable(${TARGET} main.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)
66
if(TARGET BUILD_INFO)

examples/metal/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set(TEST_TARGET metal)
22
add_executable(${TEST_TARGET} metal.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TEST_TARGET} PRIVATE ggml)

examples/parallel/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET parallel)
22
add_executable(${TARGET} parallel.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)
66
if(TARGET BUILD_INFO)

examples/perplexity/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET perplexity)
22
add_executable(${TARGET} perplexity.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)
66
if(TARGET BUILD_INFO)

examples/perplexity/perplexity.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
#include <cstring>
88
#include <ctime>
99
#include <sstream>
10-
#include <thread>
11-
#include <mutex>
1210
#include <vector>
1311

12+
#if defined(__MINGW32__) && defined(_USE_MINGW_COMPAT)
13+
#include <mingw.mutex.h>
14+
#include <mingw.thread.h>
15+
#else
16+
#include <mutex>
17+
#include <thread>
18+
#endif
19+
1420
#if defined(_MSC_VER)
1521
#pragma warning(disable: 4244 4267) // possible loss of data
1622
#endif
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET quantize-stats)
22
add_executable(${TARGET} quantize-stats.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE llama ${CMAKE_THREAD_LIBS_INIT})
55
target_include_directories(${TARGET} PRIVATE ../../common)
66
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/quantize-stats/quantize-stats.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@
1616
#include <string>
1717
#include <unordered_map>
1818
#include <vector>
19-
#include <thread>
19+
20+
#if defined(__MINGW32__) && defined(_USE_MINGW_COMPAT)
21+
#include <mingw.mutex.h>
22+
#include <mingw.thread.h>
23+
#else
2024
#include <mutex>
25+
#include <thread>
26+
#endif
2127

2228
#if defined(_MSC_VER)
2329
#pragma warning(disable: 4244 4267) // possible loss of data

examples/quantize/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET quantize)
22
add_executable(${TARGET} quantize.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE llama ${CMAKE_THREAD_LIBS_INIT})
55
target_include_directories(${TARGET} PRIVATE ../../common)
66
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/save-load-state/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET save-load-state)
22
add_executable(${TARGET} save-load-state.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)
66
if(TARGET BUILD_INFO)

examples/server/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ set(TARGET server)
22
option(LLAMA_SERVER_VERBOSE "Build verbose logging option for Server" ON)
33
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
44
add_executable(${TARGET} server.cpp json.hpp httplib.h)
5-
install(TARGETS ${TARGET} RUNTIME)
5+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
66
target_compile_definitions(${TARGET} PRIVATE
77
SERVER_VERBOSE=$<BOOL:${LLAMA_SERVER_VERBOSE}>
88
)

examples/server/httplib.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ using socket_t = int;
204204
#include <cassert>
205205
#include <cctype>
206206
#include <climits>
207-
#include <condition_variable>
208207
#include <cstring>
209208
#include <errno.h>
210209
#include <fcntl.h>
@@ -222,7 +221,14 @@ using socket_t = int;
222221
#include <sstream>
223222
#include <string>
224223
#include <sys/stat.h>
224+
225+
#if defined(__MINGW32__) && defined(_USE_MINGW_COMPAT)
226+
#include <mingw.condition_variable.h>
227+
#include <mingw.thread.h>
228+
#else
229+
#include <condition_variable>
225230
#include <thread>
231+
#endif
226232

227233
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
228234
#ifdef _WIN32

examples/simple/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET simple)
22
add_executable(${TARGET} simple.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

examples/speculative/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(TARGET speculative)
22
add_executable(${TARGET} speculative.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)
66
if(TARGET BUILD_INFO)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(TARGET train-text-from-scratch)
22
add_executable(${TARGET} train-text-from-scratch.cpp)
3-
install(TARGETS ${TARGET} RUNTIME)
3+
install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_11)

0 commit comments

Comments
 (0)