summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAge
* Added Sphinx documentation generation to CMake build system.Reid Kleckner2014-04-18
| | | | | | | | | | | | | | | | | | | | | The option LLVM_ENABLE_SPHINX option enables the "docs-llvm-html", "docs-llvm-man" targets but does not build them by default. The following CMake options have been added that control what targets are made available SPHINX_OUTPUT_HTML SPHINX_OUTPUT_MAN If LLVM_BUILD_DOCS is enabled then the enabled docs-llvm-* targets will be built by default and if ``make install`` is run then docs-llvm-html and docs-llvm-man will be installed (tested on Linux only). The add_sphinx_target function is in its own file so it can be included by other projects that use Sphinx for their documentation. Patch by Daniel Liew <daniel.liew@imperial.ac.uk>! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206655 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Reformat, if(MSVC)...else()...endif()NAKAMURA Takumi2014-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206215 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ability to disable building LLVM utilsPete Cooper2014-04-02
| | | | | | | Patch by Chris Bieneman git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205478 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: initial backend importTim Northover2014-03-29
| | | | | | | | | | | | This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merge the two into a single backend, during which time thorough code review should naturally occur. Everything will be easier with the target in-tree though, hence this commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205090 91177308-0d34-0410-b5e6-96231b3b80d8
* Win installer: provide a pretty iconHans Wennborg2014-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204960 91177308-0d34-0410-b5e6-96231b3b80d8
* static link polly into toolsSebastian Pop2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203886 91177308-0d34-0410-b5e6-96231b3b80d8
* move WITH_POLLY option before add_subdirectory(tools)Sebastian Pop2014-03-11
| | | | | | | | | | | the first run of the polly buildbot failed, and then it started passing. This is due to the fact that the buildbot re-builds in an existing directory, and the first run does not have WITH_POLLY set when it enters tools/. Thus, cmake ignores the tools/polly dir in the first run, and then because it reuses the CMakeCache.txt of the previous run, it has the WITH_POLLY set by the previous run, and so it passes the second time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203615 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR13550: add a cmake WITH_POLLY optionSebastian Pop2014-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203486 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around FreeBSD rtld rpath $ORIGIN limitationEd Maste2014-03-09
| | | | | | | | | | FreeBSD's rtld requires the DF_ORIGIN flag set in order to process $ORIGIN in rpath. FreeBSD bug http://bugs.freebsd.org/187114 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203419 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleaning up a bunch of pre-Visual C++ 2012 build hacks.Yaron Keren2014-03-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202806 91177308-0d34-0410-b5e6-96231b3b80d8
* Add patch level to llvm version in CMake and AutoconfTom Stellard2014-03-03
| | | | | | | | | | The shared library generated by autoconf will now be called libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)$(VERSION_SUFFIX).so and a symlink named libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_SUFFIX).so will also be created in the install directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202720 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Switch the CMake option from LLVM_ENABLE_CXX11 (default on) toChandler Carruth2014-03-01
| | | | | | | | LLVM_ENABLE_CXX1Y (default *off*). =D C++98 is dead. Long live C++11. I don't exactly recommend using C++1y just yet though... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202567 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Remove dead C backend optionReid Kleckner2014-02-28
| | | | | | Patch by Jevin Sweval! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202556 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Switch CMake to use C++11 by default! Next up, autoconf/make!Chandler Carruth2014-02-28
| | | | | | | | | Now, please don't get too excited. I've just toggled the default to suss out the last remaining bot problems. This does *not* mean we can all go write lots of C++11 code yet. I at least want to let the dust settle from the bots first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202542 91177308-0d34-0410-b5e6-96231b3b80d8
* Centralize the handling of install_name and rpath.Rafael Espindola2014-02-28
| | | | | | | | | | | This centralizes the Makefile handling of -install_name and -rpath. It also moves the cmake build to using @rpath. The reason being that libclang needs it, and it works for everything else. A followup patch will move clang to using this and then there will be a single point to edit to support other systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202499 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce LLVM_BUILD_EXTERNAL_COMPILER_RT optionAlexey Samsonov2014-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202363 91177308-0d34-0410-b5e6-96231b3b80d8
* Use an install name dir of @executable_path/../lib instead of @rpath.Rafael Espindola2014-02-26
| | | | | | | Using @executable_path/../lib matches what we have on Makefiles and works with older versions of OS X too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202302 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce cmake_policy(CMP0022) for ↵NAKAMURA Takumi2014-02-26
| | | | | | | | | | | | target_link_libraries(INTERFACE|PRIVATE). For now, use both keywords, INTERFACE and PRIVATE via the variable, - ${cmake_2_8_12_INTERFACE} - ${cmake_2_8_12_PRIVATE} They could be cleaned up when we introduce 2.8.12. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202239 91177308-0d34-0410-b5e6-96231b3b80d8
* Permit CMAKE_INSTALL_RPATH to be set on command lineBernard Ogden2014-02-24
| | | | | | | | | | | Commit 201921 overrides setting of CMAKE_INSTALL_RPATH via the command line. Last time this happened we applied another patch to only set CMAKE_INSTALL_RPATH if already defined (r197825). This patch does the same thing again, but only for the UNIX case - we leave APPLE alone as presumably the original committer is happy with the non-overriding behaviour. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202085 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert "Use relative rpath so that the installation and build dirs ↵Rafael Espindola2014-02-22
| | | | | | | | | | are relocatable."" This reverts commit r201934. Polly has been fixed to work with this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201936 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Use relative rpath so that the installation and build dirs are ↵Rafael Espindola2014-02-22
| | | | | | | | | | | relocatable." This reverts commit r201921. This should bring the polly bots back. I will try to build it locally to understand how cmake was setting the rpath of LLVMPolly.so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201934 91177308-0d34-0410-b5e6-96231b3b80d8
* Use relative rpath so that the installation and build dirs are relocatable.Rafael Espindola2014-02-22
| | | | | | | | | This works by asking cmake to use the "install rpath", but setting that rpath to be relative. Thanks a lot to Brad King for the help with CMake! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201921 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix LLVM install rules to not set permissions on include/NAKAMURA Takumi2014-02-10
| | | | | | | | | | | | | The CMake install(DIRECTORY) command documents that it sets permissions on directories it is asked to install. Since the <prefix>/include directory may not be exclusive to the LLVM installation, we should not ask CMake to manage permissions of that directory for us. Instead, give only our own include/llvm and include/llvm-c subdirectories to the install(DIRECTORY) command. Fixes PR4500. Patch by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201075 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move -stdlib=libc++ handling into its own file.Jordan Rose2014-02-05
| | | | | | | | | | | | | | r200744 moved this into cmake/config-ix.cmake, so that it would happen very early in the build process. However, standalone builds of Clang and other external projects never include this file (which is correct). Now, -stdlib=libc++ and the LLVM_COMPILER_IS_GCC_COMPATIBLE option are both set in a new include file, HandleLLVMStdlib, which is included by both config-ix.cmake and HandleLLVMOptions.cmake. This preserves existing behavior for projects relying on HandleLLVMOptions and still does the right thing for builds of LLVM itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200811 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add -stdlib=libc++ to host Clang build flags before performing any ↵Alexey Samsonov2014-02-04
| | | | | | | | | | | | | header search If LLVM_ENABLE_LIBCXX is specified, we should append -stdlib=libc++ to build flags as early as possible, in particular, before we check for header presence (as -stdlib=libc++ modifies header lookup rules). Otherwise we can find a header at configure time (w/o -stdlib=libc++) but fail to find it at build time (with -stdlib=libc++). See PR18569 for more details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200744 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move cmake_minimum_required(2.8.8) at the top.NAKAMURA Takumi2014-02-02
| | | | | | Suggested by Stephen Kelly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200645 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move libgtest for external projects.NAKAMURA Takumi2014-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200558 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce new scheme of LLVM_TOOLS_BINARY_DIR and LLVM_LIBRARY_DIRNAKAMURA Takumi2014-01-19
| | | | | | | | In LLVM build tree, they points corresponding INTDIR. In Clang standalone tree, they points external dir (llvm-config's --bindir and --libdir). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199595 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add comments in llvm/CMakeLists.txt.NAKAMURA Takumi2014-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199594 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Deprecate LLVM_TOOLS_BINARY_DIR.NAKAMURA Takumi2014-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199593 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor the option and checking of compiler version better. Put theChandler Carruth2014-01-13
| | | | | | | | option with the others in the top level CMakeLists, and put the check in HandleLLVMOptions. This will also let it be used from the standalone Clang builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199149 91177308-0d34-0410-b5e6-96231b3b80d8
* Raise the minimum CMake version to 2.8.8 -- we have a report that theChandler Carruth2014-01-13
| | | | | | | | | | | | | compiler version checking doesn't work on 2.8.7. This feature was documented in 2.8.10, but existed for an unknown amount of time before that. I'm actually happy to revert this and remove the use of the feature if there is anyone with a specific problem updating CMake. Please just let me know. I don't want to re-implement this CMake functionality unless there is a reason, and this is the only real way to find that out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199148 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move BUG_REPORT_URL from clang to llvm.NAKAMURA Takumi2014-01-13
| | | | | | | | | | It was too late to set BUG_REPORT_URL after configure_file(config.h). BUG_REPORT_URL in config.h.cmake would be updated at 2nd run of cmake. It caused many recompilations. FYI, configure handles BUG_REPORT_URL in llvm side. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199076 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a cmake LLVM_ENABLE_LIBCXX build parameter to compile using libc++ ↵Jean-Daniel Dupas2014-01-06
| | | | | | | | | | | | | | instead of the system default Summary: This parameter is required to build C++11 projects (like lld or lldb) on OS X as the default STL does not provide c++ classes. CC: llvm-commits, triton Differential Revision: http://llvm-reviews.chandlerc.com/D2381 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198625 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][VS][XCode] Restruct the output directory layout more comfortable, ↵NAKAMURA Takumi2013-12-30
| | | | | | | | | | | | | | | | | | | ${BINARY_DIR}/${BUILD_MODE}/(bin|lib) We have been seeing nasty directory layout with CMake multiconfig, such as, bin/Release/clang.exe lib/clang/3.x/... lib/Release/clang/3.x/.. (duplicated) Move the layout similar to autoconf's; Release/bin/clang.exe Release/lib/clang/3.x/... Checked on Visual Studio 10. Could you guys please confirm my change on XCode(and other multiconfig builders)? Note: Don't set variables CMAKE_*_OUTPUT_DIRECTORY any more, or a certain builder, for eaxample, msbuild.exe, would be confused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198205 91177308-0d34-0410-b5e6-96231b3b80d8
* Resinstate the command line taking priority over CMakeLists in setting ↵Artyom Skrobov2013-12-20
| | | | | | CMAKE_INSTALL_RPATH git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197825 91177308-0d34-0410-b5e6-96231b3b80d8
* Use $ORIGIN when setting rpath.Rafael Espindola2013-12-19
| | | | | | | | | | This matches what the configure build does. Patch by Jan Vesely. Fixes pr14189. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197743 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce LLVM_RUNTIME_OUTPUT_INTDIR and LLVM_LIBRARY_OUTPUT_INTDIR ↵NAKAMURA Takumi2013-12-16
| | | | | | | | | | to reduce references to CMAKE_CFG_INTDIR. Each of them forms like; ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR} ${CMAKE_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR} git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197394 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce LLVM_INCLUDE_DIR.NAKAMURA Takumi2013-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197392 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake : optionaly enable LLVM to be compiled with -std=c++11 (default: off)Arnaud A. de Grandmaison2013-11-26
| | | | | | | | | | In some case, it may be required to build LLVM in C++11 mode, as some the subprojects (like lldb) requires it. This mimics the autoconf behaviour. However, given the discussions on the switch to C++11 of the codebase, this behaviour should evolve to default to C++11 with some checks of the compiler capabilities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195727 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Some changes to package version names:Hans Wennborg2013-11-21
| | | | | | | | | | - Allow overriding PACKAGE_VERSION from the command-line - Use PACKAGE_VERSION to set CPACK_PACKAGE_VERSION (used by the Win installer) - Don't include the version number in the CPack install dir or registry key. Differential revision: http://llvm-reviews.chandlerc.com/D2245 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195379 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/CMakeLists.txt: Update LLVM_VERSION_MINOR to 5.NAKAMURA Takumi2013-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195247 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my CMake patches concerning building with /MT (r194589, r194596)Hans Wennborg2013-11-13
| | | | | | Reid pointed out we already have LLVM_USE_CRT_{buildtype} to set it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194604 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: make building with /MT an option instead of always forcing itHans Wennborg2013-11-13
| | | | | | | | | | | | | for release builds. This is a follow-up to r194589. Aaron pointed out that building libraries with /MT and using them in an application that uses a different run-time library can be a bad idea. Move the option to build with /MT behind a CMake option so it can be turned on selectively, such as when building the toolchain installer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194596 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify CMakeLists.txt to work around pr17763 and bring some bots back.Rafael Espindola2013-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193813 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove 2.4 from the list of supported Python versions.Bill Wendling2013-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193541 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: set stack size for MSVC in just one placeHans Wennborg2013-10-17
| | | | | | | | | | | After r192904, Reid pointed out he thought we already set the stack size for MSVC. Turns out we did, but it didn't seem to work. This commit sets the stack size in a single place, using CMAKE_EXE_LINKER_FLAGS because that seems to be the way that works best. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192912 91177308-0d34-0410-b5e6-96231b3b80d8
* Restore LLVM_BUILD_RUNTIME option that was deleted in r191835, but is still ↵Alexey Samsonov2013-10-04
| | | | | | used to control building of compiler-rt and libcxx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191948 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the very substantial, largely unmaintained legacy PGOChandler Carruth2013-10-02
| | | | | | | | | | | | | | | | | | | | infrastructure. This was essentially work toward PGO based on a design that had several flaws, partially dating from a time when LLVM had a different architecture, and with an effort to modernize it abandoned without being completed. Since then, it has bitrotted for several years further. The result is nearly unusable, and isn't helping any of the modern PGO efforts. Instead, it is getting in the way, adding confusion about PGO in LLVM and distracting everyone with maintenance on essentially dead code. Removing it paves the way for modern efforts around PGO. Among other effects, this removes the last of the runtime libraries from LLVM. Those are being developed in the separate 'compiler-rt' project now, with somewhat different licensing specifically more approriate for runtimes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191835 91177308-0d34-0410-b5e6-96231b3b80d8
* Set the minimal stack size with msvc when using cmake >= 2.8.11.Rafael Espindola2013-09-25
| | | | | | | | | | This makes sure we get the same behavior with all supported cmake versions. Once we support only versions >= 2.8.11 we can experiment with other values or just setting it for some binaries. Patch by Greg Bedwell. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191372 91177308-0d34-0410-b5e6-96231b3b80d8