On May 17, 2008, at 2:44 PM, Óscar Fuentes wrote:> I don't know how much LLVM build system is tied to the GNU toolchain > or > how much it depends on *nix features, but suppossing that adding > support > for MSVC++ is impractical, perhaps it would be simpler to implement a > Makefile-based build system for MSVC++ than to keep up to date the > project files. This would support features like the one Anton mentions > on the other response to you, thus lessening the maintenance work. A > really nice thing is that, in principle, a makefile-based build system > would work the same for VS 2003, 2005 and 2008.Frankly, the LLVM build machinery could use a good scrubbing. Also, maintenance of parallel project files really sucks, if we have to continue doing this, life for non-unix people will continue to be an unhappy one. Others have suggested alternative build systems before like cmake. Apparently cmake can autogenerate VC++ and Xcode project files from the same thing that it builds from on unix systems. Has anyone used cmake in a real system before? Are there other worthwhile alternatives? To me, I think it would be interesting to switch over llvm and clang (probably start with clang since it is very small) and do other things later (e.g. llvm-test may never change off gmake, gmake is too useful there). -Chris
Chris Lattner <sabre at nondot.org> writes: [snip]> Others have suggested alternative build systems before like cmake. > Apparently cmake can autogenerate VC++ and Xcode project files from > the same thing that it builds from on unix systems.cmake creating VC++ project files does not appeal much to me. First, project files are not mandatory for using MS compiler. Second, I'm afraid that things like intermediate script invocations may be translated incorrectly to VC++ projects. Actually, gmake works well with VC++. The only odd thing is that I use other compiler (gcc or Intel's icl) for generating header file dependencies, as VC++ does not output them on a format that gmake understands (this could be solved with some awk processing).> Has anyone used cmake in a real system before? Are there other > worthwhile alternatives?Sure. Lots of them. I studied some a few years ago and concluded that it was not worth the trouble. Specifically, some of those systems (can't remember which ones) makes very easy to do essential things that for gmake are a bit complicated, but then makes very difficult to achieve things that are just a bit complicated too in gmake. [snip] -- Oscar
Chris Lattner wrote:> On May 17, 2008, at 2:44 PM, Óscar Fuentes wrote: > >> I don't know how much LLVM build system is tied to the GNU toolchain >> or >> how much it depends on *nix features, but suppossing that adding >> support >> for MSVC++ is impractical, perhaps it would be simpler to implement a >> Makefile-based build system for MSVC++ than to keep up to date the >> project files. This would support features like the one Anton mentions >> on the other response to you, thus lessening the maintenance work. A >> really nice thing is that, in principle, a makefile-based build system >> would work the same for VS 2003, 2005 and 2008. >> > > Frankly, the LLVM build machinery could use a good scrubbing. Also, > maintenance of parallel project files really sucks, if we have to > continue doing this, life for non-unix people will continue to be an > unhappy one. > > Others have suggested alternative build systems before like cmake. > Apparently cmake can autogenerate VC++ and Xcode project files from > the same thing that it builds from on unix systems. Has anyone used > cmake in a real system before? >Systems that I've worked with in the past have been platform agnostic (gmake, nant, etc) and have used a flat text format source file/directory list to specify the source files to build. This flat text file is then used by scripts (whether c# or python or something else) to generate solution/project files for MSVS or any other IDE you wish to use. These scripts can either be run as a special build target (make solution) or as a hook on svn post-commit, or both. Given that LLVM assumes build everything in a folder as a policy, this system becomes very easy to maintain: Only the addition of a folder will require a new line in the flat text file. Dominic
Chris Lattner wrote:> Others have suggested alternative build systems before like cmake. > Apparently cmake can autogenerate VC++ and Xcode project files from > the same thing that it builds from on unix systems. Has anyone used > cmake in a real system before? Are there other worthwhile > alternatives?I can recommend omake (http://omake.metaprl.org/index.html). My company uses it for a large project with many directories, several source languages, some tricky preprocessing, under Unix and Windows (MSVC and MinGW toolchains). We have been very happy with it. omake would add an extra build-time dependency to LLVM (i.e. it does not generate "native" Makefiles and project files), but I think it's worth considering it. Alain
Hi> Others have suggested alternative build systems before like cmake. > Apparently cmake can autogenerate VC++ and Xcode project files from > the same thing that it builds from on unix systems. Has anyone used > cmake in a real system before?I haven't used it myself but it seems to do the job for the KDE devels. There's some background information on http://lwn.net/Articles/188693/. It seems as if the cmake developers where quite responsive to their needs.> To me, I think it would be interesting to switch over > llvm and clang (probably start with clang since it is very small) and > do other things later (e.g. llvm-test may never change off gmake, > gmake is too useful there).I never liked the autotools. CMake looks much friendlier at a first glance. Tim
On Sunday 18 May 2008, Óscar Fuentes wrote:> Chris Lattner <sabre at nondot.org> writes: > > [snip] > > > Others have suggested alternative build systems before like cmake. > > Apparently cmake can autogenerate VC++ and Xcode project files from > > the same thing that it builds from on unix systems. > > cmake creating VC++ project files does not appeal much to me. First, > project files are not mandatory for using MS compiler.cmake can create nmake files as well. It's also possible to add a different generator that use something else (even one that would output to gmake and use msvc compiler and gcc for header dependencies ;) ).> Second, I'm > afraid that things like intermediate script invocations may be > translated incorrectly to VC++ projects.Calling external program works correctly, I am not sure why it woud be different for script invocations.> > Has anyone used cmake in a real system before?Kitware (the creators of cmake) products (VTK and ITK), KDE, scribus, inkscape for the biggest project I know which use cmake. All of them use it for building on windows, mac os x and unixes. But, at least, for KDE, I am not sure if for mac os x, anyone has try to use it with Xcode. Personnally, I use cmake for building a project (OpenGTL) that link to llvm. -- Cyrille Berger