Felipe97/llama-cpp-compiled
01.1k
1cmake_minimum_required(VERSION 3.14)2project(llama-simple)3 4set(CMAKE_CXX_STANDARD 17)5 6option(LLAMA_TEST_USE_SUBDIR "Use add_subdirectory instead of find_package" OFF)7 8if(LLAMA_TEST_USE_SUBDIR)9 add_subdirectory(../../ llama.cpp)10else()11 find_package(llama 0.1.0 REQUIRED)12endif()13 14add_executable(test-cmake test-cmake.cpp)15target_link_libraries(test-cmake PRIVATE llama)16 17if(DEFINED LLAMA_BUILD_NUMBER)18 target_compile_definitions(test-cmake PRIVATE19 LLAMA_BUILD_NUMBER=${LLAMA_BUILD_NUMBER}20 LLAMA_BUILD_COMMIT="${LLAMA_BUILD_COMMIT}"21 )22endif()23 