Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are "out of source" builds not the default?

Tags:

c++

I just found out recently that you can configure Visual Studio (but this question is the same for any compiler) to dump the intermediate .o files into a separate folder outside of the source tree, instead of alongside each individual project. That makes it easy to clean the project up to archive to zip or something along those lines.

Why is that kind of configuration not more common? Are there any significant downsides?

like image 545
Billy ONeal Avatar asked Jul 16 '10 02:07

Billy ONeal


2 Answers

I'm going to go with "because VS is developed in a vacuum, where ideas from the outside world don't often intrude. Organizing build files in this way worked acceptably in the first versions of Visual Studio (or its non-Studio precursors), and since that's the way it's always been done in-house, and no one ever came in from the outside and said "you know, the rest of the world would really like to separate intermediate junk files and their actual source code", the VS team never figured it was an issue.

It's just a guess, but I can't think of a better explanation.

like image 151
jalf Avatar answered Oct 04 '22 00:10

jalf


This is probably a question with a history answer. The first C compilers (and thus the first C++ compilers) were written on and for Unix.

There is no 'standard' place for much of anything in Unix, with only a few exceptions. As such, the normal practice is to just put everything in the current working directory, unless instructed otherwise.

like image 31
SingleNegationElimination Avatar answered Oct 03 '22 23:10

SingleNegationElimination