May 28, 2021

[cmake] commands


Reference:
https://cprieto.com/posts/2016/10/cmake-out-of-source-build.html



out-of-dir build:
$ cmake --build build_dir --clean-first


Debugging find module:
$cmake -DCMAKE_FIND_DEBUG_MODE=ON -G Ninja ../

Show compile commands:
$ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON path/to/llvm/sources

Change compiler:
$ -DCMAKE_C_COMPILER=/path/to/clang
$ -DCMAKE_CXX_COMPILER=/path/to/clang++

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.