Only can run a quick build because of Travis time restrictions. Should
try to find a set of most-likely-to-fail command line args, maybe
"-O -gc -fPIC"?
- Relax version checking because we intend to have only a single branch
- Exclude ldfpu.asm from build with MSVC-32 (reported by huynh van sen)
- Fix FindLLVM.cmake to work on Windows again
The current code to locate libconfig++ has some trouble:
- It is located in the main CMakeList file but should be a module of its own
- It depends on pkg-config which is not available on Windows
- The returned values are not really useful therefore the library name is hard coded
This commit tries to solve these problems. For a Unix-like system there should be no difference.
Additionally, you can override the variables on the command line which is useful for builds on Windows.
Previously, it was not clear to the user if pkg-config detection failed, leading to surprises if libconfig++ actually was present on the system.
The LIBCONFIG* variables are now always cached so that they can conveniently be set from ccmake/cmake-gui.
As per the CMake docs, LANGUAGE is only to be set for files that are actually compiled. In versions prior to 2.8.7, setting it globally worked fine nevertheless.
As discussed on IRC, Bob has been the default (and recommended) way to build Tango for LDC for quite some time now. Support for it in the CMake-based build system just created a big maintenance burden for (almost) no benefits. Besides, the build system was currently broken anyway.
The makefiles seemed to support building *.bc libs for Tango though, which Bob probably doesn't, which might be worth keeping in mind.
This enables us to remove the whole ugly config file parsing hack.
Also includes some minor CMake beautifications (nobody should really be at 2.4 anymore, 2.6 is more than three years old now).
In detail, this commit:
- Changes the default version that is built to D2, use D_VERSION to override.
- Reverts back to building static libs by default until we are certain shared libs work fine everywhere.
- Fixes installation pathes so that CMAKE_INSTALL_PREFIX is respected; /etc as sysconf dir for /usr prefix is special-cased.
- Fixes out-of-source builds again, and causes temporary files (idgen, …) not to be written to the source directory anymore.
This is a slightly cleaned up version of the changes from https://github.com/ldc-developers/ldc/pull/12.