Skip to content

Commit

Permalink
add standalone build option (#99)
Browse files Browse the repository at this point in the history
* add standalone build option

* Update CMakeLists.txt for more clarity in comment

Co-authored-by: Alex <saharNooby@users.noreply.github.com>

* add endofline properly for right formating

---------

Co-authored-by: Alex <saharNooby@users.noreply.github.com>
  • Loading branch information
schamane and saharNooby committed Jun 14, 2023
1 parent 69639f2 commit 15b7c7b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ option(RWKV_ACCELERATE "rwkv: enable Accelerate framework"
option(RWKV_OPENBLAS "rwkv: use OpenBLAS" OFF)
option(RWKV_CUBLAS "rwkv: use cuBLAS" OFF)

# Build only shared library without building tests and extras
option(RWKV_STANDALONE "rwkv: build only RWKV library" OFF)

#
# Compile flags
#
Expand Down Expand Up @@ -284,6 +287,11 @@ if (GGML_CUDA_SOURCES)
set_property(TARGET rwkv PROPERTY CUDA_ARCHITECTURES OFF)
endif()

enable_testing()
add_subdirectory(tests)
add_subdirectory(extras)
if (NOT RWKV_STANDALONE)
set_property(TARGET ggml PROPERTY GGML_STANDALONE OFF)
enable_testing()
add_subdirectory(tests)
add_subdirectory(extras)
elseif()
set_property(TARGET ggml PROPERTY GGML_STANDALONE ON)
endif()

0 comments on commit 15b7c7b

Please sign in to comment.