summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] add_lit_testsuite: EXCLUDE_FROM_ALL excludes the test ${target} out ↵NAKAMURA Takumi2012-10-101-5/+8
| | | | | | of check-all. llvm-svn: 165618
* [CMake] Enhance add_llvm_external_project.NAKAMURA Takumi2012-10-051-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 llvm-svn: 165311
* [CMake] add_lit_target: Remove comments about add_dependencies. It is not a ↵NAKAMURA Takumi2012-08-041-5/+0
| | | | | | bug in cmake that add_custom_target(DEPENDS) would not accept targets but file-level dependencies. llvm-svn: 161295
* detabifyGabor Greif2012-07-121-2/+2
| | | | llvm-svn: 160128
* LLVMConfig.cmake.in: Quote around @LLVM_INSTALL_PREFIX@, or it would not ↵NAKAMURA Takumi2012-07-071-1/+1
| | | | | | | | accept whitespace paths. Thanks to Kai. llvm-svn: 159887
* Revert r159588, and apply a more principled fix. Place the fix for thisChandler Carruth2012-07-021-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. llvm-svn: 159593
* Switch from using a lit.cfg-generator variable that happens to be foundChandler Carruth2012-07-021-1/+1
| | | | | | | | | due to strange scoping rules to the actual canonical variable name within the LLVM CMake build. No functionality changed. llvm-svn: 159575
* Hoist LLVM's lit testsuite infrastructure into module so that it can beChandler Carruth2012-06-301-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. llvm-svn: 159482
* Add a missing common variable to the lit.site.cfg generation. This wasChandler Carruth2012-06-291-0/+1
| | | | | | only used in the Clang tree, but it seems reasonable to support. llvm-svn: 159399
* Move the setup for variables that are expanded in the lit.site.cfg intoChandler Carruth2012-06-281-0/+51
| | | | | | | a dedicated helper function. This will enable re-using the same logic for Clang's lit setup, etc. llvm-svn: 159333
* LLVMProcessSources.cmake: [MSVC] Don't add "PROPERTIES HEADER_FILE_ONLY" to ↵NAKAMURA Takumi2012-06-241-1/+2
| | | | | | | *.def. FIXME: Shall we put *.def(s) to the folder? llvm-svn: 159102
* Avoid using the recently added APPEND_STRING feature. This shouldChandler Carruth2012-06-211-7/+9
| | | | | | | restore support for CMake versions before 2.8.6 -- sorry for the trouble! llvm-svn: 158930
* Completely refactor the structuring of unittest CMake files to match theChandler Carruth2012-06-212-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. llvm-svn: 158909
* Factor the logic for setting up a GoogleTest unit test executable intoChandler Carruth2012-06-211-0/+50
| | | | | | | a helper function in CMake. This will allow us to share all of this logic with Clang, and eventually CompilerRT. llvm-svn: 158896
* Remove one of the LLVM-specific CMake hacks in favor of standard CMakeChandler Carruth2012-06-211-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. llvm-svn: 158889
* TableGen.cmake: Fix to work without LLVM_COMMON_DEPENDS.NAKAMURA Takumi2012-06-171-1/+3
| | | | llvm-svn: 158650
* cmake: Pass the -m32 flag to modules if LLVM_BUILD_32_BITS is enabledTobias Grosser2012-06-081-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> llvm-svn: 158195
* [CMake] Promote extension warnings to errors.Michael J. Spencer2012-06-071-1/+4
| | | | llvm-svn: 158176
* [CMake] Order MSVC warnings numerically.Michael J. Spencer2012-06-071-2/+2
| | | | llvm-svn: 158171
* [CMake] Adjust MSVC warnings.Michael J. Spencer2012-06-071-2/+6
| | | | | | | Remove /Wall from LLVM_ENABLE_WARNINGS (it's useless) and promote 4239 to a level 1 warning. llvm-svn: 158170
* Fix how CMake appends -m32 to linker command-linesTim Northover2012-05-231-2/+2
| | | | llvm-svn: 157337
* Adding -fcolor-diagnostics is causing problem to users that parse the buildRafael Espindola2012-05-081-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. llvm-svn: 156392
* Pass -fcolor-diagnostics when it is supported. This makes a difference whenRafael Espindola2012-05-041-0/+4
| | | | | | using cmake+ninja, since ninja buffers the compiler output. llvm-svn: 156150
* [CMake] Restructure how Clang, Polly and other external projects get included.Michael J. Spencer2012-04-261-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. llvm-svn: 155654
* CMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older ↵NAKAMURA Takumi2012-04-211-3/+1
| | | | | | environments than VS9. llvm-svn: 155285
* CMake: Prune redundant LLVM_COMPILER_JOBS from llvm/CMakeLists.txt. ↵NAKAMURA Takumi2012-04-211-0/+2
| | | | | | HandleLLVMOptions.cmake has it. llvm-svn: 155284
* Minimal changes for LLVM to compile under VS11.Michael J. Spencer2012-03-011-0/+4
| | | | llvm-svn: 151849
* Enable -Wcovered-switch-default again, but add -Werror to the checks to makeRafael Espindola2012-02-281-0/+4
| | | | | | sure we don't use it with compilers that don't support it. llvm-svn: 151665
* Temporarily revert r151609, which enabled a new warning for LLVM andChandler Carruth2012-02-281-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. llvm-svn: 151649
* Enable -Wcovered-switch-default as it matches the switch style used in llvm.Rafael Espindola2012-02-281-0/+4
| | | | llvm-svn: 151609
* add LLVM_VERSION_MAJOR and _MINOR definesDylan Noblesmith2012-02-131-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. llvm-svn: 150405
* CMake: Add the folder "Tablegenning" on llvm-tblgen targets.NAKAMURA Takumi2012-01-301-0/+1
| | | | llvm-svn: 149219
* -fvisibility-inlines-hidden is a c++ only option.Rafael Espindola2012-01-251-1/+0
| | | | | | Thanks to Peter Collingbourne for noticing it. llvm-svn: 148913
* Undo an over zealous rename. This bit of the CMake build really isChandler Carruth2012-01-242-3/+3
| | | | | | | dealing in the host triple, be honest about it and document the decision to default the target triple to the host triple unless overridden. llvm-svn: 148822
* Don't use -fvisibility-inlines-hidden on mingw to try to avoid a lot ofRafael Espindola2012-01-201-5/+9
| | | | | | warnings from gcc. llvm-svn: 148539
* cmake: pass -fvisibility-inlines-hidden if it is supported. In aRafael Espindola2012-01-201-0/+6
| | | | | | | Release+Asserts build with -DBUILD_SHARED_LIBS=ON, the install directory goes from 72MB to 70MB. llvm-svn: 148530
* Tweak CMake build on Cygwin.NAKAMURA Takumi2011-12-161-1/+1
| | | | llvm-svn: 146725
* cmake: work with CMake < 2.8.5Dylan Noblesmith2011-12-121-1/+3
| | | | | | | | | | | CMake versions 2.8.4 and earlier were giving this error since r146323: "string end index: -1 is out of range 0 - 6" Passing -1 as the length of the desired substring was a new feature added in CMake 2.8.5: http://www.cmake.org/Bug/view.php?id=10740 llvm-svn: 146372
* Use a simpler and more reliable command for converting from HEAD toChandler Carruth2011-12-101-1/+1
| | | | | | commit-ish. Funny thing, they have a command designed for this. ;] llvm-svn: 146325
* Teach the VCS detection to set some root-level variables with the rawChandler Carruth2011-12-101-0/+3
| | | | | | | revision and git commit data extracted. This will be used in the Clang CMake build to avoid trying to re-detect the information. llvm-svn: 146324
* At the request of Michael Spencer, make the VCS version detection logicChandler Carruth2011-12-101-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in CMake a bit more handy. Previously we would get such charming versions as the following for revision NNNN and commit-ish XXXXX: 3.1svnsvn-rNNNN 3.1svngit-svn-rNNNN 3.1svngit-svn-XXXXX The mechanism selecting betwene the latter two was particularly odd, and didn't work with all of the ways git-svn repos are set up apparently. It also misses an important point -- both the revision *and* the git commit might be relevant when working on a local branch some distance from mainline. The new logic does several things: 1) It strips the redundant initial 'svn'. 2) It always looks for a git-svn revision number base, and when found includes it in the version. 3) If the git commit-ish for the current HEAD is not exactly that revision number, it is also included. The resulting strings should roughly be: 3.1svn-rNNNN 3.1git-svn-rNNNN 3.1git-svn-rNNNN-XXXXX Suggestions on formatting etc always welcome. =] I've only looked at the LLVM version string here, not Clang's (yet). Note that the commit-ish reported is *not* terribly accurate. It updates when 'cmake' is run, not when the binary is built. Still, it may be better than nothing, especially if people have fairly long-lived git repos and branches. This is not a new limitation, just didn't want anyone to be surprised. llvm-svn: 146323
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-291-3/+0
| | | | llvm-svn: 145420
* build/cmake: Switch to using llvm-build computed dependencies.Daniel Dunbar2011-11-293-9/+11
| | | | | | | | - I verified locally that the current dependency lists are identical. - This makes add_llvm_library_dependencies() a no-op. I'll remove it once this change passes the bots. llvm-svn: 145355
* Fix CRT selection logic when using CMake NMake generator.NAKAMURA Takumi2011-11-061-2/+2
| | | | | | | | CMAKE_CONFIGURATION_TYPES is only set on Visual Studio generators. For NMake CMAKE_BUILD_TYPE is used instead. Patch by EJose Fonseca! llvm-svn: 143898
* build/cmake: Move all the user controllable options into top-level CMakeListsDaniel Dunbar2011-11-041-13/+4
| | | | | | for consistency. llvm-svn: 143728
* Fix a typo noticed by Peter Collingbourne. No one depends on thisChandler Carruth2011-11-021-1/+1
| | | | | | | working today, but it shouldn't corrupt state for some poor soul to debug later. llvm-svn: 143545
* The TableGen parts of the CMake build are seriously broken. This fixesChandler Carruth2011-11-021-1/+3
| | | | | | | | | | | | | | one aspect of them by having them use the (annoying, if not broken) proper library dependency model for adding the LLVMTableGen library as a dependency. This could manifest as a link order issue in the presence of separate LLVM / Clang source builds with CMake and a linker that really cares about such things. Also, add the Support dependency to llvm-tblgen itself so that it doesn't rely on TableGen's transitive Support dependency. A parallel change for clang-tblgen will be forthcoming. llvm-svn: 143531
* Add -D__STDC_FORMAT_MACROS to use PRIx64.NAKAMURA Takumi2011-10-111-0/+1
| | | | llvm-svn: 141663
* cmake/modules/HandleLLVMOptions.cmake: Reorder __STDC_CONSTANT_MACROS and ↵NAKAMURA Takumi2011-10-111-1/+1
| | | | | | __STDC_LIMIT_MACROS. llvm-svn: 141662
* Build system infrastructure for multiple tblgens.Peter Collingbourne2011-10-062-29/+73
| | | | llvm-svn: 141266
OpenPOWER on IntegriCloud