@@ -14,30 +14,22 @@ add_library(dataset-to-gguf-lib
14
14
dataset-to-gguf/llama-dataset-reader/llama-parquet-data-reader.cpp
15
15
)
16
16
17
- # Link libraries for dataset-to-gguf-lib
17
+ if (WIN32 )
18
+ target_compile_options (dataset-to-gguf-lib PRIVATE /std:c++17 )
19
+ else ()
20
+ target_compile_features (dataset-to-gguf-lib PRIVATE cxx_std_17 )
21
+ endif ()
22
+
18
23
target_link_libraries (dataset-to-gguf-lib common llama ${CMAKE_THREAD_LIBS_INIT} )
19
24
if (LLAMA_PARQUET )
20
25
target_link_libraries (dataset-to-gguf-lib Arrow::arrow_shared Parquet::parquet_shared )
21
26
endif ()
22
- target_compile_features (dataset-to-gguf-lib PRIVATE cxx_std_11 )
23
-
24
27
25
28
add_executable (convert-to-train-gguf convert-to-train-gguf.cpp )
26
- target_link_libraries (convert-to-train-gguf PRIVATE dataset-to-gguf-lib ) # Link to the new library
27
- target_compile_features (convert-to-train-gguf PRIVATE cxx_std_11 ) # Apply C++ standard to the executable
29
+ add_dependencies (convert-to-train-gguf dataset-to-gguf-lib )
30
+ target_link_libraries (convert-to-train-gguf PRIVATE dataset-to-gguf-lib )
28
31
29
- # Define the executable for the unit tests
30
32
set (TEST_TARGET_GGUF_DATASET_CONVERTER_TESTS dataset-to-gguf-unit-tests )
31
33
add_executable (${TEST_TARGET_GGUF_DATASET_CONVERTER_TESTS} dataset-to-gguf/tests/dataset-to-gguf-tests.cpp )
32
-
33
- # Link necessary libraries for the test executable
34
+ add_dependencies (${TEST_TARGET_GGUF_DATASET_CONVERTER_TESTS} dataset-to-gguf-lib )
34
35
target_link_libraries (${TEST_TARGET_GGUF_DATASET_CONVERTER_TESTS} PRIVATE common llama dataset-to-gguf-lib )
35
-
36
- # Ensure C++17 for filesystem usage for the test executable
37
- target_compile_features (${TEST_TARGET_GGUF_DATASET_CONVERTER_TESTS} PRIVATE cxx_std_17 )
38
-
39
- add_test (
40
- NAME ${TEST_TARGET_GGUF_DATASET_CONVERTER_TESTS} #
41
- COMMAND $< TARGET_FILE:${TEST_TARGET_GGUF_DATASET_CONVERTER_TESTS} >
42
- LABEL "training"
43
- )
0 commit comments