Commit Graph

15 Commits

Author SHA1 Message Date
NAKAMURA Takumi
27c27a0b61 [autoconf] llvm/cmake/modules/Makefile: Make sure to regenerate LLVMConfig.cmake whenever Makefile is updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225206 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-05 21:24:36 +00:00
NAKAMURA Takumi
75beb04d36 [autoconf] Export LLVM_LIBDIR_SUFFIX with empty string in LLVMConfig.cmake. tools/llvm-config is also doing so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225204 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-05 21:14:14 +00:00
Dan Liew
056270700d Don't attempt to run llvm-config in cmake/modules/Makefile when doing
``make clean`` because it won't be available.

This is an attempt to unbreak buildbots broken by r217484.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217490 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-10 11:09:23 +00:00
Dan Liew
aa55210555 Attempt to fix PR20884
This fixes the generation of broken LLVMExports.cmake file by
the Autoconf/Makefile build system when --enable-shared is passed to
configure.

When --enable_shared is passed the Makefile.rules does not set the
LLVMConfigLibs variable which cmake/modules/Makefile previously relied
on. Now it runs the llvm-config command itself to get the library names.

This still isn't perfect because the generated LLVM targets refer to the
static libraries and not the shared library but that is much larger
problem to fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217484 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-10 10:18:59 +00:00
Dan Liew
e6113b6aa8 Add LLVM_TOOLS_BINARY_DIR variable to LLVMConfig.cmake so clients
of LLVM using CMake can easily find the tools directory.

LLVM_BUILD_TOOLS_BINARY_DIR was removed because it is now
superfluous.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213674 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 17:48:51 +00:00
Dan Liew
153dc48cd3 Export LLVM_ENABLE_RTTI and LLVM_ENABLE_EH in LLVMConfig.cmake so
clients of LLVM know if RTTI and/or EH were enabled in the build of
LLVM they are trying to link against.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213664 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 15:41:33 +00:00
Dan Liew
285c82122d Export LLVM_ENABLE_ASSERTIONS in LLVMConfig.cmake so clients know
if the version of LLVM they are trying to use was built with or
without assertions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213532 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-21 14:17:15 +00:00
Eric Christopher
0fa7dc4762 Teach LLVMConfigVersion.cmake to behave as find_package() expects.
Patch by Brad King

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206426 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 23:15:31 +00:00
Eric Christopher
8e589975ea Add support for a patch version to the cmake system.
Patch by Brad King

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206425 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 23:15:28 +00:00
NAKAMURA Takumi
043cc54d6c Simplify linking to system libraries
The LLVMSupport library implementation consolidates all dependencies on
system libraries.  Move the logic gathering system libraries out of
'cmake/modules/LLVM-Config.cmake' and into 'lib/Support/CMakeLists.txt'.
Use the target_link_libraries() command there to tell CMake about the
link dependencies of the LLVMSupport implementation.  CMake will
automatically propagate this to all targets that link LLVMSupport
directly or indirectly.

We still need to build knowledge of system library dependencies into
'llvm-config'.  Store the list of libraries needed in a property on
LLVMSupport and teach 'tools/llvm-config/CMakeLists.txt' to retrieve it
from there.

Drop all calls to 'link_system_libs' and 'get_system_libs' from our
CMake code.  Replace their implementations with a warning that explains
the calls are no longer necessary.  Also drop from 'LLVMConfig.cmake'
the HAVE_* and related variables that were published there only to allow
'get_system_libs' to run outside our build process.

Contributed by Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201969 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-23 06:27:04 +00:00
NAKAMURA Takumi
6eeedf33d5 Teach LLVM-Config to use logical target names (2/2)
The module still needs to collect the list of all available libraries
in order to satisfy the 'all' component.  Provide this in the package
configuration file, 'LLVMConfig.cmake', as a LLVM_AVAILABLE_LIBS
variable.  (A variable is scoped better than a global property.)
Since this won't be set for our own build, fall back to looking up the
LLVM_LIBS property to get the value when it is not set.

Contributed by Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201853 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21 14:17:07 +00:00
NAKAMURA Takumi
789f722abd LLVMExports.cmake: Add System libs $(LIBS) to LLVMSupport, corresponding to r201077.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201489 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 12:14:13 +00:00
NAKAMURA Takumi
88fae4e86f LLVMExports.cmake: Exclude gtest since they are not installed.
FIXME: gtest might be included if external project could refer to the build tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201488 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 12:14:03 +00:00
Bob Wilson
a4122f4746 Remove shell comment in the middle of a single-line command.
You can't put a comment in the middle of a command like this. This is
invalid shell syntax and breaks the build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201057 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-09 22:36:31 +00:00
NAKAMURA Takumi
4c56efbd44 Provide CMake package modules in install tree
Teach the Makefile build system to generate and install CMake modules
LLVMConfig.cmake and LLVMConfigVersion.cmake so that applications that
build with CMake can use 'find_package(LLVM)' even when LLVM is not
built with CMake.  These modules tell such applications about available
LLVM libraries and their dependencies.

Run llvm-config to generate the list of libraries and use the results of
llvm-build to generate the library dependencies.  Use sed to perform
substitutions in the LLVMConfig.cmake.in and LLVMConfigVersion.cmake.in
sources that our CMake build system uses.

Teach the Makefile build system to generate the LLVMExports.cmake file
with content similar to that produced by the CMake install(EXPORT)
command.  Extend llvm-build with an option to generate the library
dependencies fragment for this file.

Contributed by Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201053 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-09 16:37:02 +00:00