GithubHelp home page GithubHelp logo

bazel-to-cmake's People

Contributors

haberman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bazel-to-cmake's Issues

unable to convert bazel to cmake

unable to convert bazel to cmake in apollo source code:https://github.com/ApolloAuto/apollo
it has both files BUILD and Workspace.
user@B45:~/apollo$ python /home/user/bazel-to-cmake/bazel_to_cmake.py CMakeLists.txt
Traceback (most recent call last):
File "/home/user/bazel-to-cmake/bazel_to_cmake.py", line 266, in
execfile("WORKSPACE", GetDict(WorkspaceFileFunctions(converter)))
NameError: name 'execfile' is not defined

Only files in base dir are parsed

Hi, i do have a project layout like this:
~/prj/WORKSPACE
~/prj/a/b/BUILD
~/prj/a/b/main.cpp
cmake_to_bazel is not able to provide a valid CMakeLists.txt because it assumes a BUILD file in ~/prj/
And even if there was a BUILD file in ~/prj/, the other files deep down the directory are not accessed at all, i.e. only one single CMakeLists.txt is created

Use a Starlark interpreter

This tool does not use Bazel implementation at all. Instead it takes advantage of the fact that Bazel input files are a subset of Python by using Python to evaluate them.

Have you considered using a real Starlark interpreter? For example, https://github.com/google/starlark-go is easy to embed.

not support new_local_repository

hi, I run the command and got the errors blew.

execfile("WORKSPACE", GetDict(WorkspaceFileFunctions(converter)))

File "WORKSPACE", line 81, in
new_local_repository(
NameError: name 'new_local_repository' is not defined

Alternative approach

Hi, whoever is working on this, did you consider using bazel query results to build up the cmake files? Similar to this approach: https://github.com/lizan/bazel-cmakelists/
I think the advantage would be, that you'd have a real representation of how the project is supposed to look like, instead of parsing files directly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.