Live data from Hacker News

Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

xmake.io

31–40 of 57 posts

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#31
This tool is (again) just rehashing the same old build methods only with different syntax.

I'd really like to see a build tool that would take things to the next level.

- As a developer if I include "foobar.h" in my code, why do I have to workout the include paths myself? Why can't the build system search for the file and resolve the include paths? If there are any unresolvable ambiquieties then ask me.

- As a developer if I use for example std::thread why do I need to add manually -pthread to my build / linker flags. Why can't the build system do this for me?

- As a developer if I use let's say Win32 API in my code why do I have to manually add the linker libs and flags. Why can't the build system do this for me?

- As a developer if I use c++14 features in my code, why do I need to manually add the -std=c++14 whatever flag in my build files? Why can't the build system do this for me?

etc.

Everything else is just re-hashing the same old tiring build metdhologies with different syntax/problems/bugs/shortcomings/portability bugs.

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#32
post #7

Why not Python? Syntax is much cleaner and there’s nothing you can’t achieve. Even performance is on par.

Python as in Scons? Otherwise I don't understand your comment.

There's also Snakemake, which is mostly used in bioinformatics pipelines, but it's sort of like a Makefile program with inline python enabled.

It's nice and I could imagine it getting some adoption because of its flexibility, but my C++ projects tend to have their needs met with Makefile.

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#33

This tool is (again) just rehashing the same old build methods only with different syntax. I'd really like to see a build tool that would take things to the next level. - As a developer if I include "foobar.h" in my code, why do I have to workout the include paths myself? Why can't the build system search for the file and resolve the include paths? If there are any unresolvable ambiquieties then ask me. - As a develo…

I think Borland C++ did all the above in the 90s, having to manually tell GCC which libraries to link against (and with even in the "correct" order!) was something i found baffling back when i first tried MinGW.

Though it did help that all libraries and headers are part of the compiler itself. And perhaps it was using something like MSVC's #pragma comment(lib, "libname") (which i really wish GCC/Clang would implement at some point as it is very convenient) in every header it came with to properly associate with the relevant library, though i'm almost sure i replaced the OpenGL headers it came with and recreated the .lib file to be more complete (the default had only OpenGL 1.0 symbols) yet it still found the new stuff.

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#34
I'm not sure how it differs from all the existing tools really, it looks like it does more or less the same stuff, just slightly differently. Also it does look like it requires that xmake is itself installed on the target system.

Personally i'd like something similar to autotools, only much saner, in that you write some sort of script (or definition file or whatever) that describes your project and its requirements and then the tool generates a configure shell script for unix and windows (i mean two configure scripts, one for unix and one for windows) that itself generates a makefile and/or project file.

So, like autotools, the recipient of the code will not need to have your magic build tool installed, just the common tools available on their system (shell, make, cc for unix/mingw, visual studio or whatever on windows). This can be very useful especially for libraries (it is annoying when every library wants its own special snowflake build tool).

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#35
post #34

I'm not sure how it differs from all the existing tools really, it looks like it does more or less the same stuff, just slightly differently. Also it does look like it requires that xmake is itself installed on the target system. Personally i'd like something similar to autotools, only much saner, in that you write some sort of script (or definition file or whatever) that describes your project and its requirements a…

xmake can also support to generatr other project file. e.g. makefile vsproj cmakelist compile_command and etc.

  xmake project -k makefile
  xmake project -k vs2019
  xmake project -k cmakelist
  xmake project -k vsxmake 
  ...

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#36
There are so many nice build tools for C, but unfortunately very few users will be happy to install and learn yet another tool.

And no matter which build system you choose, you'll find users who think your choice is awful and you should have picked their one true build system.

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#37

Earlier quoted context omitted.

I completely disagree. Do you want to go back to typing g++ commands by hand for each source file? That's not a build tool and yet it is objectively worse than even a crappy build tool.

No, ofc nobody wants to do that and that's not really what I'm saying. I'm saying that all current build tools suck and can only ever decrease your software's value and decrease productivity. Let me illustrate. Your software is a product X. It has some value V (as by some measure of value, perhaps $ earned). The product X is the ultimate output of some build tool T. Now image you had this incredible build tool that p…

> Now image you had this incredible build tool that produced X without any programmer doing any build related work ever at all. Your build output is X and value is V. 100% of your developer effort can go towards working on X and increasing V!

That is only the case for the simplest of software though. "Build systems" are often much more than just build systems: they are project management tools.

e.g. quite often I have to perform some preprocessing or code generation.

I could :

- A: write a $cross_platform_scripting_language script and integrate it to my build system & CI, ensure that the script interpreter is correctly found, that the build dependency graph is correct, etc etc. But just getting the same version of python to work reliably on 5+ different platforms is already quite a pain.

- B: write the preprocessor directly in my build system language (in my case, most of the time CMake).

Option B takes wayyyyy less time in my experience than option A, even though it looks more "build-related" than option A.

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#38

I so badly want to get off the C/C++ build system roller coaster. I've gone from make to autoconf to various IDEs to CMake to Meson, and have looked at a bunch of others but never made the jump. Eventually fatigue sets in, you pick a tech, and stick with it even as the tech fades into obscurity and nobody can figure out how to build your project anymore, let alone integrate it :/

I have it easy, MSBuild, and when not on Windows, CMake.

Then again, I just need it to the extend of Java/.NET mixed builds with C++.

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#39

I so badly want to get off the C/C++ build system roller coaster. I've gone from make to autoconf to various IDEs to CMake to Meson, and have looked at a bunch of others but never made the jump. Eventually fatigue sets in, you pick a tech, and stick with it even as the tech fades into obscurity and nobody can figure out how to build your project anymore, let alone integrate it :/

I got off the C/C++ roller coaster long time ago. Currently staying on D. Others get off at the Rust station. I don't intend to ever go back unless forced by my employer.

Re: Show HN: A Modern C/C++ build tools (Simple, Fast, Cross-platform)

#40

This tool is (again) just rehashing the same old build methods only with different syntax. I'd really like to see a build tool that would take things to the next level. - As a developer if I include "foobar.h" in my code, why do I have to workout the include paths myself? Why can't the build system search for the file and resolve the include paths? If there are any unresolvable ambiquieties then ask me. - As a develo…

> If there are any unresolvable ambiquieties then ask me.

what if there is no ambiguity, only a single wrong answer, and now it "works" but you include the wrong thing ?

> - As a developer if I use for example std::thread why do I need to add manually -pthread to my build / linker flags. Why can't the build system do this for me?

because adding -pthread and -lpthread have different semantics (-pthread defines _REENTRANT which may change things - grep your /usr/include for that ;p) and you may want one or the other regardless of whether you use std::thread.

> - As a developer if I use let's say Win32 API in my code why do I have to manually add the linker libs and flags. Why can't the build system do this for me?

which linker libs ? on my computer I must have 5 version of those right now, not counting UWP and various MinGW versions. Also sometimes I want the debug standard library and sometimes not.

> - As a developer if I use c++14 features in my code, why do I need to manually add the -std=c++14 whatever flag in my build files? Why can't the build system do this for me?

determining if you are using C++14 features sounds like a corollary of the halting problem

Post reply on HN