Live data from Hacker News

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

github.com

61–70 of 190 posts

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

#61
post #59

This looks thoughtfully created (and so documented!). I haven't gone through the entire doc and am not particularly clear but can you cross-build too? How would you run MSVC linker on Linux?

Support cross-build, but you need install mingw for linux, if you want to build win32 program on linux.

You can see https://xmake.io/#/home?id=cross-compilation and https://xmake.io/#/home?id=mingw

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

#62
post #8

One of the purposes of xmake is to solve the problem of C/C++ dependency packages.

So is Conan's[¹], and Conan is already supported by cmake. [¹] https://conan.io/

I think you mean CMake is supported by Conan (as is Meson), since Conan is the higher level abstraction.

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

#63

Earlier quoted context omitted.

Why migrate from CMake to meson?

CMake feels a lot like C++89: Lots of things you can do, but there are problems: * No standardization or opinionated design, so you can't share your work easily. * No sane defaults, so your build system is always fragile, difficult to maintain, and done wrong. * No best practices, so people keep making the same mistakes over and over. * Misguided attempt to remain compatible with the steaming pile of legacy they've a…

Xmake will be better, you can try it.

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

#65
post #16

Don’t ever install software by piping arbitrary remote scripts into bash.

Assuming the script is hosted on an https site, is a popular tool (like brew or rustup) from a trusted source, why would this be any more dangerous than downloading and installing from a a package manager? What would it take beyond https and a well-known site to make you comfortable doing this?

> Assuming the script is hosted on an https site, is a popular tool (like brew or rustup) from a trusted source, why would this be any more dangerous than downloading and installing from a a package manager?

Most package manager use an offline signature mechanism done at build time (rpm, dpkg, nix) and do not rely on HTTPS security for anything else than eyes-dropping reasons.

Relying purely on HTTPS is insecure. Nothing guarantee you that your source / script / package did not get hacked / modified between the time you uploaded it and the time your user downloaded it.

This is not hypothetical scenario, it already happened in the past with sites like sourceforge.

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

#66
post #12

Earlier quoted context omitted.

"CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice." They would disagree with you.

Cmake is a makefile generator. The output of cmake is a series of makefiles. That's it. If you need to build a project and you don't have make, nmake, jmake or whatevermake in your system them cmake does nothing to get your project built.

CMake can generate:

* Borland Makefiles

* MSYS Makefiles

* MinGW Makefiles

* NMake Makefiles

* Unix Makefiles

* Watcom WMake

* Ninja

* Visual Studio projects

* Green Hills MULTI

* Xcode projects

And more: https://cmake.org/cmake/help/latest/manual/cmake-generators....

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

#67
post #12

Earlier quoted context omitted.

"CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice." They would disagree with you.

Cmake is a makefile generator. The output of cmake is a series of makefiles. That's it. If you need to build a project and you don't have make, nmake, jmake or whatevermake in your system them cmake does nothing to get your project built.

Both CMake and Make are tools for building binaries just on different levels of abstraction. You wouldn’t say someone didn’t make you coffee if they use a coffee maker!

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

#68
post #14

Meson[0] has been gaining in popularity and has migration tools for cmake projects. Large projects such as systemd and gnome[1] have migrated or have been migrating for years [0] https://mesonbuild.com/ [1] https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

The Cmake migration tools are not very good.

Meson has no glob support.

Meson does not support any form of remote caching.

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

#69
post #46

Earlier quoted context omitted.

And CMake itself started as a simple DSL for generating Makefiles. We've gone full circle

CMake is still a DSL for generating makefiles.

Yea, but what it's not is simple.

Imho dealing with dependencies and making project build in one shot is hard in cmake.

Maybe I did things wrong though.

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

#70

Earlier quoted context omitted.

Cmake is a makefile generator. The output of cmake is a series of makefiles. That's it. If you need to build a project and you don't have make, nmake, jmake or whatevermake in your system them cmake does nothing to get your project built.

CMake can generate: * Borland Makefiles * MSYS Makefiles * MinGW Makefiles * NMake Makefiles * Unix Makefiles * Watcom WMake * Ninja * Visual Studio projects * Green Hills MULTI * Xcode projects And more: https://cmake.org/cmake/help/latest/manual/cmake-generators....

But it still depends on third-party IDE or build tools. It will be limited by their own features.

There are still many differences in the behavior of different IDEs.

Post reply on HN