ztxz16 / fastllm

纯c++的全平台llm加速库,支持python调用,chatglm-6B级模型单卡可达10000+token / s,支持glm, llama, moss基座,手机端流畅运行
Apache License 2.0
3.28k stars 332 forks source link

cmake 的时候提示找不到add_compile_definitions #390

Open PeterXiaTian opened 8 months ago

PeterXiaTian commented 8 months ago

如题,在cmake的时候提示找不到下面的宏,请问是什么原因?

-- The CXX compiler identification is GNU 7.5.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- USE_CUDA: ON -- PYTHON_API: OFF -- USE_SENTENCEPIECE: OFF -- CMAKE_CXX_FLAGS -pthread --std=c++17 -O2 -march=native -- The CUDA compiler identification is NVIDIA 11.3.109 -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done CMake Error at CMakeLists.txt:50 (add_compile_definitions): Unknown CMake command "add_compile_definitions".

PeterXiaTian commented 8 months ago

是不是gcc,cmake的版本不兼容所致?

TylunasLi commented 8 months ago

请问您使用的cmake是什么版本?早期 (<3.12) 版本的cmake不支持这个命令,参考这里

ztxz16 commented 6 months ago

应该是CMake版本比较老,需要升级一下