1 # This file sets up a CMakeCache for a simple build with multiple distributions.
2 # Note that for a real distribution, you likely want to perform a bootstrap
3 # build; see clang/cmake/caches/DistributionExample.cmake and the
4 # BuildingADistribution documentation for details. This cache file doesn't
5 # demonstrate bootstrapping so it can focus on the configuration details
6 # specific to multiple distributions instead.
8 # Build an optimized toolchain for an example set of targets.
9 set(CMAKE_BUILD_TYPE Release CACHE STRING "")
10 set(LLVM_TARGETS_TO_BUILD
16 # Enable the LLVM projects and runtimes.
17 set(LLVM_ENABLE_PROJECTS
21 set(LLVM_ENABLE_RUNTIMES
27 # We'll build two distributions: Toolchain, which just holds the tools
28 # (intended for most end users), and Development, which has libraries (for end
29 # users who wish to develop their own tooling using those libraries). This will
30 # produce the install-toolchain-distribution and install-development-distribution
31 # targets to install the distributions.
32 set(LLVM_DISTRIBUTIONS
37 # We want to include the C++ headers in our distribution.
38 set(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS
42 # You likely want more tools; this is just an example :) Note that we need to
43 # include cxx-headers explicitly here (in addition to it being added to
44 # LLVM_RUNTIME_DISTRIBUTION_COMPONENTS above).
45 set(LLVM_Toolchain_DISTRIBUTION_COMPONENTS
48 clang-resource-headers
54 # Note that we need to include the CMake exports targets for the distribution
55 # (development-cmake-exports and clang-development-cmake-exports), as well as
56 # the general CMake exports target for each project (cmake-exports and
57 # clang-cmake-exports), in our list of targets. The distribution CMake exports
58 # targets just install the CMake exports file for the distribution's targets,
59 # whereas the project CMake exports targets install the rest of the project's
60 # CMake exports (which are needed in order to import the project from other
61 # CMake_projects via find_package, and include the distribution's CMake exports
62 # file to get the exported targets).
63 set(LLVM_Development_DISTRIBUTION_COMPONENTS
66 development-cmake-exports
71 clang-development-cmake-exports