CMakeLists.txt 482 B

123456789101112131415161718192021222324
  1. # common
  2. set(TARGET common)
  3. add_library(${TARGET} OBJECT
  4. common.h
  5. common.cpp
  6. sampling.h
  7. sampling.cpp
  8. console.h
  9. console.cpp
  10. grammar-parser.h
  11. grammar-parser.cpp
  12. train.h
  13. train.cpp
  14. )
  15. if (BUILD_SHARED_LIBS)
  16. set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
  17. endif()
  18. target_include_directories(${TARGET} PUBLIC .)
  19. target_compile_features(${TARGET} PUBLIC cxx_std_11)
  20. target_link_libraries(${TARGET} PRIVATE llama)