CMake

cmake cheatsheet

命令行指定

set(CMAKE_C_COMPILER /usr/bin/clang CACHE PATH “” FORCE)
set(CMAKE_CXX_COMPILER /usr/bin/clang++ CACHE PATH “” FORCE)

cmake -S . -B build -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DCMAKE_CXX_FLAGS=”-I/usr/local/bin -I/opt/homebrew/opt/llvm/include” -DCMAKE_EXE_LINKER_FLAGS=”-L/opt/homebrew/opt/llvm/lib -lpthread”

Author

Helianthus

Posted on

2022-04-13

Updated on

2024-06-24

Licensed under