Datasets:
Upload ctxstream/CMakeLists.txt with huggingface_hub
Browse files- ctxstream/CMakeLists.txt +33 -0
ctxstream/CMakeLists.txt
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cmake_minimum_required(VERSION 3.16)
|
| 2 |
+
project(ctxstream CXX)
|
| 3 |
+
|
| 4 |
+
set(CMAKE_CXX_STANDARD 17)
|
| 5 |
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
| 6 |
+
if(NOT CMAKE_BUILD_TYPE)
|
| 7 |
+
set(CMAKE_BUILD_TYPE Release)
|
| 8 |
+
endif()
|
| 9 |
+
add_compile_options(-Wall -Wextra -Wno-unused-parameter)
|
| 10 |
+
|
| 11 |
+
find_package(Threads REQUIRED)
|
| 12 |
+
|
| 13 |
+
# Zero third-party dependencies on purpose: HTTP and the JSON subset we need are
|
| 14 |
+
# ~250 lines in backend.cpp. A client library would cost more to carry than to write.
|
| 15 |
+
add_library(ctxstream_core
|
| 16 |
+
src/manifest.cpp
|
| 17 |
+
src/codegraph.cpp
|
| 18 |
+
src/backend.cpp
|
| 19 |
+
src/pipeline.cpp
|
| 20 |
+
src/reduce.cpp)
|
| 21 |
+
target_link_libraries(ctxstream_core PUBLIC Threads::Threads)
|
| 22 |
+
# gcc < 9 needs this for std::filesystem
|
| 23 |
+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.1)
|
| 24 |
+
target_link_libraries(ctxstream_core PUBLIC stdc++fs)
|
| 25 |
+
endif()
|
| 26 |
+
|
| 27 |
+
add_executable(ctxstream src/main.cpp)
|
| 28 |
+
target_link_libraries(ctxstream PRIVATE ctxstream_core)
|
| 29 |
+
|
| 30 |
+
enable_testing()
|
| 31 |
+
add_executable(test_ctxstream tests/test_ctxstream.cpp)
|
| 32 |
+
target_link_libraries(test_ctxstream PRIVATE ctxstream_core)
|
| 33 |
+
add_test(NAME unit COMMAND test_ctxstream)
|