On 2014-03-20 15:57, Dmitry Akimov wrote:
> The C++ standard (as of C++ 11) says nothing about how the entire project
> should be handled. In practice, however, we *have to* deal with projects
> and components because a single source file is rarely enough, and it is
> usually just a huge pain in C++. Just *building* a program in C++ is a
> non-trivial task on its own. C++ sources are often accompanied by a lengthy
> convoluted build scripts which are non-standard and non-portable. In fact,
> to me it has always been one of the main drawbacks of using C++ in practice.
>
> It would be extremely wonderful if you could build a project using any
> conforming compiler on any platform with just one button press, or one
> command, without having to deal with a bunch of source code files for a
> platform where the build scripts provided by the author do not work.
>
> But why does it have to be like this? Is not it possible to standardize the
> description of a component? For example, in a form of an XML or a JSON file.
Have you *looked* at any build systems lately? Given the complexity of
projects such as autotools, CMake, scons, etc., I'm quite certain that
building projects is a sufficiently complicated project that trying to
create a standardized solution from scratch is going to be enormously
difficult.
And also inappropriate I think, since non-trivial projects often involve
a mixture of "languages" and compile tools (e.g. uic and moc for Qt
projects, rcc on Windows, etc.).
p.s. I can pretty much guarantee that "one button press" will never
happen until a) all projects standardize on a single dependency
information system, b) all operating systems standardize on a package
management system (that must allow per-user packages), and c) the two
are integrated.
See also portage, rpmbuild, etc. which do to some extent solve this
problem... for their own operating systems...
--
Matthew