CMakeLists.txt 612 B

123456789101112131415161718192021
  1. if (GGML_ALL_WARNINGS)
  2. if (NOT MSVC)
  3. set(cxx_flags
  4. # TODO(marella): Add other warnings.
  5. -Wpedantic
  6. -Wunused-variable
  7. -Wno-unused-function
  8. -Wno-multichar
  9. )
  10. add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:${cxx_flags}>")
  11. endif()
  12. endif()
  13. add_library(common STATIC common.cpp)
  14. target_include_directories(common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
  15. add_library(common-ggml STATIC common-ggml.cpp)
  16. target_link_libraries(common-ggml PRIVATE ggml)
  17. target_include_directories(common-ggml PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
  18. add_subdirectory(unity)