summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)AuthorFilesLines
2012-10-10[CMake] add_lit_testsuite: EXCLUDE_FROM_ALL excludes the test ${target} out ↵NAKAMURA Takumi1-5/+8
of check-all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165618 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05[CMake] Enhance add_llvm_external_project.NAKAMURA Takumi1-3/+9
- Substitute hyphen to underscore, s/-/_/g, as the variable name. - Additional parameter can be specified as the name of directory. e.g.) add_llvm_external_project(clang-tools-extra extra) - LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=/path/to/llvm-srcroot/tools/clang/tools/extra, by default. - Build directory is in ${CMAKE_CURRENT_BINARY_DIR}/extra git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165311 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11CMake toolchain file for Android NDK.Evgeniy Stepanov1-0/+21
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163612 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-04Fix Android build of gtest and lib/Support.Evgeniy Stepanov1-3/+13
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163131 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01PR13689: Check for backtrace(3) in the cmake build.Benjamin Kramer1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163074 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31Make sure to build libpthread to check for HAVE_PTHREAD_MUTEX_LOCK.Eric Christopher1-3/+1
Patch by Brad Smith! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163033 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-20enable cross compilation with cmakeSebastian Pop1-2/+0
This patch allows us to use cmake to specify a cross compiler: target different than host. In particular, it moves LLVM_DEFAULT_TARGET_TRIPLE and TARGET_TRIPLE variables from cmake/config-ix.cmake to the toplevel CMakeLists.txt to make them available at configure time. Here is the command line that I have used to test my patches to create a Hexagon cross compiler hosted on x86: $ cmake -G Ninja -D LLVM_TARGETS_TO_BUILD:STRING=Hexagon -D TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_DEFAULT_TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_TARGET_ARCH:STRING=hexagon-unknown-linux-gnu .. $ ninja check git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162219 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-20enable Hexagon target from cmakeSebastian Pop1-0/+2
The patch adds a missing case for the Hexagon target in cmake/config-ix.cmake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162218 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-08revert my previous patchSebastian Pop1-2/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161505 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-08enable Hexagon target from cmakeSebastian Pop1-5/+2
This patch allows us to use cmake to specify a cross compiler for Hexagon. In particular, the patch adds a missing case for the target Hexagon in cmake/config-ix.cmake, and it moves LLVM_DEFAULT_TARGET_TRIPLE and TARGET_TRIPLE variables from cmake/config-ix.cmake to the toplevel CMakeLists.txt to make them available at configure time. Here is the command line that I have used to test my patches: $ cmake -G Ninja -D BUILD_SHARED_LIBS:BOOL=ON -D LLVM_TARGETS_TO_BUILD:STRING=Hexagon -D TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_DEFAULT_TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_TARGET_ARCH:STRING=hexagon-unknown-linux-gnu -D LLVM_ENABLE_PIC:BOOL=OFF .. $ ninja check git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161504 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04[CMake] add_lit_target: Remove comments about add_dependencies. It is not a ↵NAKAMURA Takumi1-5/+0
bug in cmake that add_custom_target(DEPENDS) would not accept targets but file-level dependencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161295 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-22autoconf: Re-introduce LLVM_HOSTTRIPLE since r143500, as rework of PR11060.NAKAMURA Takumi1-0/+1
cmake: Add LLVM_HOSTTRIPLE. For now, it is same as TARGET_TRIPLE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-12detabifyGabor Greif1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160128 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07LLVMConfig.cmake.in: Quote around @LLVM_INSTALL_PREFIX@, or it would not ↵NAKAMURA Takumi1-1/+1
accept whitespace paths. Thanks to Kai. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02Revert r159588, and apply a more principled fix. Place the fix for thisChandler Carruth1-1/+6
in the abstraction for lit test suites so that the various other layers of abstraction pick up the same behavioral fix, and so that we still get a complete list of dependencies for the 'check-all' target. This should fix the follow-on issues of the same nature with various other build targets, including Clang targets. Sorry for the churn, and again thanks to Matt for testing and breaking this more thoroughly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159593 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02Switch from using a lit.cfg-generator variable that happens to be foundChandler Carruth1-1/+1
due to strange scoping rules to the actual canonical variable name within the LLVM CMake build. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159575 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-30Hoist LLVM's lit testsuite infrastructure into module so that it can beChandler Carruth1-0/+43
re-used. Also, build in direct support for accumulating a set of lit parameters, arguments, and testsuites to run as part of a 'check-all' rule. This sinks 'check-all' from a Clang-specific construct to a generic construct of the project. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159482 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29Add a missing common variable to the lit.site.cfg generation. This wasChandler Carruth1-0/+1
only used in the Clang tree, but it seems reasonable to support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159399 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28Move the setup for variables that are expanded in the lit.site.cfg intoChandler Carruth1-0/+51
a dedicated helper function. This will enable re-using the same logic for Clang's lit setup, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159333 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-24LLVMProcessSources.cmake: [MSVC] Don't add "PROPERTIES HEADER_FILE_ONLY" to ↵NAKAMURA Takumi1-1/+2
*.def. FIXME: Shall we put *.def(s) to the folder? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159102 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21Avoid using the recently added APPEND_STRING feature. This shouldChandler Carruth1-7/+9
restore support for CMake versions before 2.8.6 -- sorry for the trouble! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158930 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21Completely refactor the structuring of unittest CMake files to match theChandler Carruth2-7/+8
Makefiles, the CMake files in every other part of the LLVM tree, and sanity. This should also restore the output tree structure of all the unit tests, sorry for breaking that, and thanks for letting me know. The fundamental change is to put a CMakeLists.txt file in the unittest directory, with a single test binary produced from it. This has several advantages: - No more weird directory stripping in the unittest macro, allowing it to be used more readily in other projects. - No more directory prefixes on all the source files. - Allows correct and precise use of LLVM's per-directory dependency system. - Allows use of the checking logic for source files that have not been added to the CMake build. This uncovered a file being skipped with CMake in LLVM and one in Clang's unit tests. - Makes Specifying conditional compilation or other custom logic for JIT tests easier. It did require adding the concept of an explicit 'optional' source file to the CMake build so that the missing-file check can skip cases where the file is *supposed* to be missing. =] This is another chunk of refactoring the CMake build in order to make it usable for other clients like CompilerRT / ASan / TSan. Note that this is interdependent with a Clang CMake change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158909 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21Factor the logic for setting up a GoogleTest unit test executable intoChandler Carruth1-0/+50
a helper function in CMake. This will allow us to share all of this logic with Clang, and eventually CompilerRT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158896 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21Remove one of the LLVM-specific CMake hacks in favor of standard CMakeChandler Carruth1-1/+0
facilities. This was only used in one place in LLVM, and was used pervasively (but with different code!) in Clang. It has no advantages over the standard CMake facilities and in some cases disadvantages. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158889 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-17TableGen.cmake: Fix to work without LLVM_COMMON_DEPENDS.NAKAMURA Takumi1-1/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158650 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-08cmake: Pass the -m32 flag to modules if LLVM_BUILD_32_BITS is enabledTobias Grosser1-0/+1
This was previously only done for executables and shared libraries, but not for modules. As modules are essentially shared libraries (that need to be dlopened explicitly), threating them the same as shared libraries seems reasonable. This fixes the LLVM_BUILD_32_BITS build of Polly. Contributed by: Ondra Hosek <ondra.hosek@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158195 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07[CMake] Promote extension warnings to errors.Michael J. Spencer1-1/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158176 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07[CMake] Order MSVC warnings numerically.Michael J. Spencer1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158171 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07[CMake] Adjust MSVC warnings.Michael J. Spencer1-2/+6
Remove /Wall from LLVM_ENABLE_WARNINGS (it's useless) and promote 4239 to a level 1 warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158170 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-23Fix how CMake appends -m32 to linker command-linesTim Northover1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157337 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-08Adding -fcolor-diagnostics is causing problem to users that parse the buildRafael Espindola1-4/+0
output. Peter Collingbourne also reports that it is showing up in $(llvm-config --cflags). Revert this for now since I don't know enough cmake to fix it properly. This reverts commit 18efed7adc79c1970f307bb5b015d199012ba872. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156392 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-05[build] Add build check for ::arc4random().Daniel Dunbar1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156236 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-04Pass -fcolor-diagnostics when it is supported. This makes a difference whenRafael Espindola1-0/+4
using cmake+ninja, since ninja buffers the compiler output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156150 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03Add rudimentary CMake logic for detecting Graphviz.Ted Kremenek1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26[CMake] Restructure how Clang, Polly and other external projects get included.Michael J. Spencer1-0/+18
While making lld build under the tools directory I decided to refactor how this works. There is now a macro, add_llvm_external_project, which takes the name of the expected subdirectory. This sets up two CMake options. * LLVM_EXTERNAL_${NAME}_SOURCE_DIR This is the path to the source. It defaults to ${CMAKE_CURRENT_SOURCE_DIR}/${name}. * LLVM_EXTERNAL_${NAME}_BUILD Enable and disable building the tool as part of LLVM. I chose LLVM_EXTERNAL_${NAME} as a prefix so they all show up together in the GUI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155654 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-21CMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older ↵NAKAMURA Takumi1-3/+1
environments than VS9. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155285 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-21CMake: Prune redundant LLVM_COMPILER_JOBS from llvm/CMakeLists.txt. ↵NAKAMURA Takumi1-0/+2
HandleLLVMOptions.cmake has it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155284 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-26Add InitializeNativeTargetDisassembler function.Eric Christopher1-0/+5
Patch by Ojab. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153476 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-01Minimal changes for LLVM to compile under VS11.Michael J. Spencer1-0/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151849 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28Enable -Wcovered-switch-default again, but add -Werror to the checks to makeRafael Espindola1-0/+4
sure we don't use it with compilers that don't support it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151665 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28Temporarily revert r151609, which enabled a new warning for LLVM andChandler Carruth1-4/+0
Clang builds. The detection logic for compilers that support the warning isn't working. Rafael is going to investigate it, but didn't want people to have to wade through build spam until then. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151649 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28Enable -Wcovered-switch-default as it matches the switch style used in llvm.Rafael Espindola1-0/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13add LLVM_VERSION_MAJOR and _MINOR definesDylan Noblesmith1-0/+2
This is useful for clients that want to maintain compatibility across multiple releases of LLVM. Currently users like Klee and Mesa all have to roll their own 'parse llvm-config --version output and generate defines' solution. Also reuse the new macros so that version information is less redundant/likely to fall out of sync again in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150405 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30CMake: Add the folder "Tablegenning" on llvm-tblgen targets.NAKAMURA Takumi1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149219 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-25-fvisibility-inlines-hidden is a c++ only option.Rafael Espindola1-1/+0
Thanks to Peter Collingbourne for noticing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148913 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-24Undo an over zealous rename. This bit of the CMake build really isChandler Carruth3-6/+9
dealing in the host triple, be honest about it and document the decision to default the target triple to the host triple unless overridden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148822 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20Don't use -fvisibility-inlines-hidden on mingw to try to avoid a lot ofRafael Espindola1-5/+9
warnings from gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148539 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20cmake: pass -fvisibility-inlines-hidden if it is supported. In aRafael Espindola1-0/+6
Release+Asserts build with -DBUILD_SHARED_LIBS=ON, the install directory goes from 72MB to 70MB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148530 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-05revert r147542 after comments from Joerg SonnenbergerSebastian Pop1-3/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147608 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-04use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJITSebastian Pop1-0/+3
Get back getHostTriple. For JIT compilation, use the host triple instead of the default target: this fixes some JIT testcases that used to fail when the compiler has been configured as a cross compiler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147542 91177308-0d34-0410-b5e6-96231b3b80d8