The workaround script to generate a CMakeLists.txt
from Bazel C++ target.
bazel-cmakelists --targets <bazel-target>
e.g.
bazel-cmakelists --targets //test/...
- Do not use generated
CMakeLists.txt
to build, use bazel. - Only tested with CLion, might work for other IDEs that understand
CMakeLists.txt
- After a change to
BUILD
orWORKSPACE
files, re-run the script to getCMakeLists.txt
updated.
- Python 2.7
- Bazel 0.17+