3

I am trying to experiment with buck for my personal projects but looking at the documentation, I could not find what actually happens at the build stage. When I set up a project using cxx_ options, will buck generate a makefile for me or will it produce CMakeLists.txt? Or for example, on Windows, is there chance for me to create Visual Studio project files? You can also direct me to the documentation but I could not find such information.

meguli
  • 1,426
  • 1
  • 18
  • 35
  • 1
    None of those. It uses itself. – hobbs Mar 09 '17 at 06:45
  • Can it only use gcc to compile? There is a way to set platform specific compiler flags but documentation seems to be assuming gcc usage. – meguli Mar 09 '17 at 07:05
  • I don't believe Windows support is fully fleshed out for native code yet. – sdwilsh Mar 09 '17 at 21:36
  • @meguli You can configure the compiler used in `.buckconfig` https://buckbuild.com/concept/buckconfig.html#cxx Clang and GCC work, but Windows support is a bit rough. – sdgfsdh Jul 28 '17 at 14:06

1 Answers1

4

Buck's build process is (roughly):

  • Execute the Python in the BUCK file, recording the cxx_library and cxx_binary targets found.
  • Copy source and header files to the build area. This ensures that only explicit dependencies are included in the build.
  • Generate calls to Clang and GCC in the build area.
  • Execute the calls (in parallel where possible)

Here is a talk that explains it better.

The compiler used can be changed in your Buck config. You can add compiler flags to your targets.

Buck does not generate Make files like CMake does, and it is all the better for it.

It is possible to generate project files for your IDE using project. I do not think that Visual Studio is supported at this time.

Have a look at this short guide for getting started with C++ and Buck.

Community
  • 1
  • 1
sdgfsdh
  • 33,689
  • 26
  • 132
  • 245