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.txtto build, use bazel. - Only tested with CLion, might work for other IDEs that understand
CMakeLists.txt - After a change to
BUILDorWORKSPACEfiles, re-run the script to getCMakeLists.txtupdated.
- Python 2.7
- Bazel 0.17+