Commit graph

27 commits

Author SHA1 Message Date
Kai Nacke
535221e16d Add llvm-config-3.5 to search list 2014-01-02 15:57:49 +01:00
Kai Nacke
d4f8092dde Support LLVM 3.5.
LLVM 3.5 adds a new required component lto.
2013-12-13 07:41:22 +01:00
David Nadlinger
66484b580a Simplify git_describe to work on CMake 2.8.0.
FindGit doesn't seem to work as expected on Ubuntu 10.04
(GIT-NOTFOUND even though Git is installed and available
on the $PATH).

This implementation might be overly simplistic and it
should probably use find_program() to locate Git. We need
to revisit this after the 0.12.0 release is out.
2013-10-21 23:35:28 +02:00
David Nadlinger
f9e141a006 Prefer named tags to Git revision hashes for LDC verison.
This allows for building of release packages without
manually overriding the version string.

The --tag argument is needed to pick up un-annotated tags
as well.
2013-10-09 16:05:29 +02:00
David Nadlinger
1d7943bc7e Simplify FindLibconfig++ using find_package_handle_standard_args features. 2013-10-06 07:39:12 +02:00
kai
c39a04f038 Do not use llvm-config on Windows.
LLVM 3.4 now also provides a llvm-config tool. The output is
not yet parseable by our cmake module, so just don't use it.
2013-08-24 16:13:38 +02:00
kai
aa143b560c Include Git revision in version info.
CMakeLists.txt contains now the version numbers for DMD and (next) LDC release.
If a .git folder is found then the LDC version is replaced by the first 6 chars
of the Git revision.

Possible improvements:

- If the build is not done at the master branch then it could be useful to check for a tag and use the tag instead of the revision. (for release builds)
- Maybe it is useful to include the branch name.

This fixes issue #366.
2013-06-21 06:47:32 +02:00
kai
40926eaba5 Add detection of used Linux distribution.
This information is then used to put the bash completion files into the right directory.
2013-06-16 23:06:50 +02:00
kai
32cf5318a4 Add llvm-config-3.4 to list of llvm-config names.
The LLVM 3.4 development ccycle has started. We should be prepared
for a distribution which starts to use this name.
2013-06-15 16:12:09 +02:00
David Nadlinger
5423a90c25 Search LLVM_ROOT_DIR before system directories. 2013-06-05 17:11:08 +02:00
David Nadlinger
47a1815892 Try llvm-config binaries with version suffix.
This allows us to pick up the newest available version on
several common Debian derivatives.

[Cherry-picked 2b4f49b4e from master.]
2013-06-05 17:11:05 +02:00
David Nadlinger
8bda7ff0c8 MinGW LLVM compiler flag fixes.
Our CMake code should be rewritten to not expect things as strings
that really aren't, but this would entail a whole lot of cross-
platform testing, so I'm postponing it for now.
2013-02-13 16:00:08 +01:00
David Nadlinger
539f7bba82 Also force -fno-rtti on MinGW. 2013-02-13 00:07:51 +01:00
David Nadlinger
3fc9a0faa3 CMake 2.8.0 compatibility. 2012-12-11 23:08:13 +01:00
David Nadlinger
f23d79135f Make sure to include -fno-rtti in LLVM_CXXFLAGS. 2012-12-09 23:16:17 +01:00
David Nadlinger
fc327909a3 Reworded "LLVM not found" message.
Setting LLVM_CONFIG is the way to go on many Linux systems, which
add a version suffix to the LLVM binaries.
2012-12-09 23:15:20 +01:00
kai
9dad0a6b3b Convert output of llvm-config --targets-built to a list. This fixes #148. 2012-08-01 06:47:37 +02:00
kai
e144d8d4ad In FindLLVM.cmake metachars must be escaped before embedding paths into regex. 2012-07-29 19:18:48 +02:00
kai
2addbd2b71 More changes to the build system.
- 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
2012-07-28 22:41:34 +02:00
kai
508dd9ff70 Simplify CMakeLists.txt.
This version works with LLVM 3.0 and 3.1.
2012-07-24 23:33:15 +02:00
kai
eb008fac44 Fixed wrong default value for LIBCONFIG++_FOUND 2012-06-19 06:52:46 +02:00
kai
51256b8c82 Fixed a wrong variable reference. 2012-06-19 06:44:36 +02:00
kai
6dd643608a Fix for review comments. 2012-06-18 21:26:18 +02:00
kai
c5eba4a98b New CMake module to locate libconfig++
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.
2012-06-18 19:50:11 +02:00
kai
93b2334803 Add more MSVC stuff to CMake files. 2012-06-15 12:20:02 +02:00
kai
3eef7b7d55 First attempt to create build files for MSVC. 2012-06-13 18:23:39 +02:00
David Nadlinger
bafe9c8e03 Factored out LLVM detection into separate CMake module. 2011-11-12 17:48:28 +01:00