Live data from Hacker News

Show HN: Xmake, a modern C/C++ build utility

github.com

81–90 of 190 posts

Re: Show HN: Xmake, a modern C/C++ build utility

#81

What I miss about these tools is some "relatively" straightforward dependency detection and generation. That is, I have a bunch of .cpp files which need to be compiled into individual executables in a folder bin/. I also have a folder inc/ which contains some headers (.h) and those headers possibly also have some associated TU (.cpp). Now g++ can already generate a dependency graph of headers for an executable. It is…

There's no way to achieve that with today's standard C++ as it requires metadata to access/infer package version numbers.

This will hopefully change with the introduction of C++ modules in C++20 but until them the best option available to C++ programmers is either manually managing third-party libraries or employing dependency management tools such as Conan.

Re: Show HN: Xmake, a modern C/C++ build utility

#82
a developer post a well rounded tool with documentation that was built with a lot of care. The comment thread is mostly about other tools or people dismissing the work done because another available offer is more popular or common.

When did "Show HN" threads became shark tank? Can people at least check and post about the tool itself instead of discussing CMake vs Ninja vs Meson?

Re: Show HN: Xmake, a modern C/C++ build utility

#83
post #9

Earlier quoted context omitted.

What's hermetic builds?

Hermetic Builds. ... Our builds are hermetic, meaning that they are insensitive to the libraries and other software installed on the build machine. Instead, builds depend on known versions of build tools, such as compilers, and dependencies, such as libraries. Kind of like a container for building? I had to look it up myself.

Nix does exactly what you want.

Re: Show HN: Xmake, a modern C/C++ build utility

#84
Wow. Great use of time. Build the 4363th (shitty) build tool.

I wish people used the effort in the inverse direction, i.e. finding ways to nuke some of the (shitty) build tools and consolidate efforts into building just one that would just work.

If there's a compelling need to write a new build system, I'd like it to have the following features:

  - If I use C++xy features in my code then automatically (suggest to) turn on the -std=xy flag.
  - If I include a header in my source tree automatically figure out the include path as much as possible. if failing then as the user and/or confirm
  - Automatically figure out the linker paths as much as possible, if failing then ask the user and/or confirm.
Basically I'd like to have a build tool that would just figure things out by itself as much as possible when given a source tree. So far every single build tool just repeats the same fundamental problems of the user having to program it somehow to deal with all these minute details that are not super interesting.

Re: Show HN: Xmake, a modern C/C++ build utility

#85

What I miss about these tools is some "relatively" straightforward dependency detection and generation. That is, I have a bunch of .cpp files which need to be compiled into individual executables in a folder bin/. I also have a folder inc/ which contains some headers (.h) and those headers possibly also have some associated TU (.cpp). Now g++ can already generate a dependency graph of headers for an executable. It is…

There's no way to achieve that with today's standard C++ as it requires metadata to access/infer package version numbers. This will hopefully change with the introduction of C++ modules in C++20 but until them the best option available to C++ programmers is either manually managing third-party libraries or employing dependency management tools such as Conan.

This is for internal dependencies of a project and indeed outside the scope of the standard which does not say that if a function is declared in file abc.h then it is defined in file abc.cpp and that this file is compiled into an object file abc.o which then must be linked during linking of any file which includes abc.h.

However, just because it is (like most build system questions) outside the scope of the standard does not mean that it isn’t possible to define some project-internal rules about what gets compiled and linked into what and that the build system cannot apply those rules to take work away from users.

The few external dependencies my project has are installed semiautomatically before any compilation starts.

Re: Show HN: Xmake, a modern C/C++ build utility

#86
post #73

Earlier quoted context omitted.

> Python also has version compatibility issues, such as: python2.x, 3.x. If that really bothers you then just create a virtual environment and locally deploy whatever version you want to run. That issue ceased to be a concern years ago.

> just create a virtual environment Yaw super lightweight ...

Actually it is, but nevertheless that's only required by those who for some reason still believe today that python2 vs python3 is an issue.

Re: Show HN: Xmake, a modern C/C++ build utility

#87
post #82

a developer post a well rounded tool with documentation that was built with a lot of care. The comment thread is mostly about other tools or people dismissing the work done because another available offer is more popular or common. When did "Show HN" threads became shark tank? Can people at least check and post about the tool itself instead of discussing CMake vs Ninja vs Meson?

>When did "Show HN" threads became shark tank?

From the 2007 announcement of Dropbox:

https://news.ycombinator.com/item?id=8863

""" 1. For a Linux user, you can already build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem. From Windows or Mac, this FTP account could be accessed through built-in software. """

Re: Show HN: Xmake, a modern C/C++ build utility

#88

What I miss about these tools is some "relatively" straightforward dependency detection and generation. That is, I have a bunch of .cpp files which need to be compiled into individual executables in a folder bin/. I also have a folder inc/ which contains some headers (.h) and those headers possibly also have some associated TU (.cpp). Now g++ can already generate a dependency graph of headers for an executable. It is…

Xmake can only simplify the maintenance management of dependencies, improve the usability and maintainability, but can not fully realize the way you say

Re: Show HN: Xmake, a modern C/C++ build utility

#90
post #82

a developer post a well rounded tool with documentation that was built with a lot of care. The comment thread is mostly about other tools or people dismissing the work done because another available offer is more popular or common. When did "Show HN" threads became shark tank? Can people at least check and post about the tool itself instead of discussing CMake vs Ninja vs Meson?

Yes, I agree very much.
Post reply on HN