Hi there,
The fastformat library seems really great, however I had a lot of issues getting things compiled and working. In the end, I decided to scrap your build system entirely, and just compile the library myself using cmake.
I wanted to make a wrapper that would build/install fastformat according to the specification of our groups build system:
http://pods.sourceforge.net
Unfortunately, fastformat does not conform to any of the common standards for compiling and installing public facing libraries and headers which makes it challenging to incorporate/use in larger software projects.
- the build system doesn't support "installing" to a desired location, instead it uses environment variables to "install"
- the default build system requires you to run make from a compiler specific build directory, which makes automated compiling/installing difficult
- It outputs a library name with a compiler specific name, which makes writing other Makefiles that depend on fastformat complicated/difficult. This would be helped by generating a pkg-config file that would make it easier to programatically get the required link/include flags
- the 6K line machine generated makefile is totally uninterpretable/undebuggable for users who have issues compiling (such as myself). Could you separate the building of the core library from the tests and examples? It was hard to tell what parts are critical/necessary, and which were random tests/examples. I think it would also make sense to not build the tests/examples/non-core functionality by default.
Basically, what I'd like is for fastformat to follow the standard build/install pattern of:
# unzip; ./configure; make; make install
which would install things to the system path or a user specified install prefix.
Have you considered using cmake? I think that using it would make things easier to maintain and improve portability, at the expense of adding a very common/minor dependency. The current build system seems like it would be a lot of work to maintain and keep up with changes to compilers, systems and whatnot, and it looks like there is a lot of re-implimenting the wheel going on.
If you're interested, you can checkout the end result of my dabbling here:
https://svn.csail.mit.edu/rrg_pods/wrapper-pods/FastFormat/
It works on linux (ubuntu 11.10 and 10.10), and should work on other versions of unix including Macs.
thanks!
-=Abe
It looks like good code, but the build system makes it difficult to port to LLVM on a Mac. IMHO CMake can significantly simplify this build.