IMHO, the CMake-based build system is almost complete enough to replace current MSVC++ project files (modulo some community review and bug-fixing). Is this enough for adding it to the LLVM repo?>From the point of view of a MSVC++ user, the new build system is trivialto maintain: you can add a new library or tool executable in less time that it takes to open the project file on MSVC++, it covers VC++ 2003, 2005 and 2008, generating project files or NMake makefiles on demand and it just requires a text editor for maintenance. It is on my TODO list to add a mode that doesn't require an explicit list of source files, just as LLVM make-based build system does now. IMHO it is a clear improvement over what MSVC++ users have now, with the requirement of CMake as the only drawback. However, CMake is trivial to install on Windows. It works for MinGW and Linux too, but it far from complete. Only supports the X86 target (although adding targets is not hard) and lacks lots of bells and whistles that ./configure && make have now. More specifically, it lacks all options configure has. I'm pretty confident that, with not too much work, the CMake build can catch up with ./configure && make and improve over it. Mostly on the maintenance area. The amount of explicit "bussiness logic" CMake demands is orders of magnitude smaller than ./configure && make. CMake has its rough edges, though, and there are things that I don't like, but it saves lots of work. Finally, please note that the CMake build system is absolutely unobtrusive wrt current build systems, either the make-based or the MSVC++ project files, and I'm not advocating the deprecation of neither of them. Notes: * MSVC++ users: there is no LLVMX86.o. Link against LLVMX86.lib and add /INCLUDE:_X86TargetMachineModule to your executable's link option. * Right now it ignores most of the examples (only builds Fibonacci). As an exercise, you can add the CMakeLists.txt file to each example directory and make the needed modifications to examples/CMakeLists.txt. * Has no make install nor test. * It is more than likely that there are some missing dependencies and that parallel builds are not right (please check if you have time). * Only out-of-source builds are tested. * It seems that MSVC++ 2003 and 2008 builds fails due to C++ issues. Patches highly welcomed. * For MSVC++, only NMake builds are tested. Please test IDE builds. * On non-MSVC++ targets, make VERBOSE=1 is very useful. Please attach the output of this command when reporting issues. * I'm sure I'm missing some notes. -- Oscar -------------- next part -------------- A non-text attachment was scrubbed... Name: cmake.patch Type: text/x-patch Size: 73604 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080920/c6f9a716/attachment.bin>
This is an updated version of the patch that fixes some issues on VC++ builds. -- Oscar -------------- next part -------------- A non-text attachment was scrubbed... Name: cmake.patch Type: text/x-patch Size: 73590 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080921/687284b5/attachment.bin>
On Sep 20, 2008, at 2:22 PM, Óscar Fuentes wrote:> IMHO, the CMake-based build system is almost complete enough to > replace > current MSVC++ project files (modulo some community review and > bug-fixing). Is this enough for adding it to the LLVM repo?Yes.>> From the point of view of a MSVC++ user, the new build system is >> trivial > to maintain: you can add a new library or tool executable in less time > that it takes to open the project file on MSVC++, it covers VC++ 2003, > 2005 and 2008, generating project files or NMake makefiles on demand > and > it just requires a text editor for maintenance.This sounds great. I think the right approach is to check it in, and then give the people with a stake in windows development a chance to try it out. Assuming it works well (i.e., it is an improvement over the existing project files), we can then nuke the windows project files. Eventually, it would be great to keep extending it to support development on every platform, maybe we can kill off the xcode project files and even the makefiles someday. Thanks for working on this Óscar! -Chris
On Sun, 2008-09-21 at 11:16 -0700, Chris Lattner wrote:> Thanks for working on this Óscar!>From me as well. In fact, your success at this has me looking again atCMake for some other things as well. shap
On Sun, Sep 21, 2008 at 9:27 AM, Óscar Fuentes <ofv at wanadoo.es> wrote:> This is an updated version of the patch that fixes some issues on VC++ > builds.Hi, FYI I just tried this (from r56534). I get an "error" (below) from cmake (2.6.1) about Intrinsics.gen but it seems to write out sln/vcproj anyway. Project.sln opens and builds OK (modulo a build error in llvmc2 that looks build-system agnostic). Nice work! Also, I get around 10k lines of warnings (not that that's different than previously). Would it be desirable to silence those on VS builds given that it might be easier now since the solutions are generated? My suggested list would be: 4146, 4503, 4996, 4800, 4244, 4624, 4355, 4715 if there's somewhere easy to paste that. I think those are unlikely to be interesting assuming the main development on OSX/Linux is catching genuine problems, and would help reduce noise a lot. There's a handful of others, but I'm not especially confident that they're harmless. scott ----------------- D:\llvm>cmake -G "Visual Studio 8 2005" -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found Perl: C:/Perl/bin/perl.exe -- Configuring using MSVC hack. -- Found Bison: C:/utils/bin/bison.exe -- bitreader -- asmparser -- bitreader -- X86 -- archive -- archive -- archive -- ipo -- bitreader -- linker -- jit -- linking jit -- ipo -- debugger -- asmparser -- bitreader -- support -- jit -- linking jit -- Configuring done -- Generating done CMake Error: Unknown Target referenced : D:/llvm/include/llvm/Intrinsics.gen CMake Error: Target: LLVMVMCore depends on unknown target: D:/llvm/include/llvm/Intrinsics.gen -- Build files have been written to: D:/llvm