summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAge
* Revert "Revert "Devise a package-private means to determine the LLVM version ↵Alp Toker2014-06-06
| | | | | | | | | | | string"" We probably just need to touch LLVM's configure this time to work around the totally inadequate Makefile build server integration. This reverts commit r210314. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210320 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Devise a package-private means to determine the LLVM version string"Alp Toker2014-06-06
| | | | | | | | This didn't work out on the build servers. Investigating This reverts commit r210313. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210314 91177308-0d34-0410-b5e6-96231b3b80d8
* Devise a package-private means to determine the LLVM version stringAlp Toker2014-06-06
| | | | | | | | | | This will unbreak clang vendor builds as a follow-up to r210238, now that we can't poke into LLVM's private config.h (nor should the string be exposed by llvm-config.h). This hopefully removes for good the last include of LLVM's config.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210313 91177308-0d34-0410-b5e6-96231b3b80d8
* Always check for libxml2 in CMakeAlp Toker2014-06-06
| | | | | | | This is clang's business and LLVM will soon be updated not to perform the check for us. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210308 91177308-0d34-0410-b5e6-96231b3b80d8
* We now require Visual C++ 2012 (MSVC_VERSION = 1700) or later to build LLVM.Yaron Keren2014-03-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202804 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to ↵NAKAMURA Takumi2014-02-26
| | | | | | | | | | | | | | | | | | | increase opportunity for parallel build. target_link_libraries(INTERFACE) doesn't bring inter-target dependencies in add_library, although final targets have dependencies to whole dependent libraries. It makes most libraries can be built in parallel. target_link_libraries(PRIVATE) is used to shaared library. Each dependent library is linked to the target.so, and its user will not see its grandchildren. For example, - libclang.so has sufficient libclang*.a(s). - c-index-test requires just only libclang.so. FIXME: lld is tweaked minimally. Adding INTERFACE in each library would be better thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202241 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/cfe/trunk@202239 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] clang_tblgen: Use add_public_tablegen_target.NAKAMURA Takumi2014-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201973 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Deprecate clang_tablegen(DEPENDS).NAKAMURA Takumi2014-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201971 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-21
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201842 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] add_clang_library(MODULE): Create a phony target when ↵NAKAMURA Takumi2014-02-13
| | | | | | llvm_add_library(MODULE) gave up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201319 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Clang 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/Clang installation, we should not ask CMake to manage permissions of that directory for us. Instead, give only our own include/clang and include/clang-c subdirectories to the install(DIRECTORY) command. Fixes PR4500. Patch by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201076 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] add_clang_library(): Use llvm_add_library.NAKAMURA Takumi2014-02-10
| | | | | | CMAKE_MODULE_LINKER_FLAGS can be removed since llvm_add_library(MODULE) adds same flags to MODULE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201073 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] add_clang_library(): Fix LLVM_PLUGIN_EXT in MODULE. It was broken ↵NAKAMURA Takumi2014-02-04
| | | | | | since my r199902. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200760 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] add_clang_library(): Honor STATIC.NAKAMURA Takumi2014-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200759 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/cfe/trunk@200645 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/CMakeLists.txt: Untabify.NAKAMURA Takumi2014-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200643 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Apply llvm_update_compile_flags() to add_clang_library().NAKAMURA Takumi2014-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200302 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Always set CMAKE_INCLUDE_CURRENT_DIR.NAKAMURA Takumi2014-01-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200144 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Standalone] Introduce check-all.NAKAMURA Takumi2014-01-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200143 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Reindent.NAKAMURA Takumi2014-01-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200133 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Parameterize MODULE and SHARED in add_clang_library().NAKAMURA Takumi2014-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199902 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Migrate LLVMParseArguments to CMakeParseArguments.NAKAMURA Takumi2014-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199901 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.NAKAMURA Takumi2014-01-19
| | | | | | LLVM_*_OUTPUT_INTDIR should be available everywhere. It was my mistake when I introduced INTDIR stuff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199597 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Standalone] Redefine LLVM_RUNTIME_OUTPUT_INTDIR and ↵NAKAMURA Takumi2014-01-19
| | | | | | LLVM_LIBRARY_OUTPUT_INTDIR to point appropriate target directories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199596 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVM's CMake is now using a feature that wasn't preasant in CMake 2.8.7,Chandler Carruth2014-01-13
| | | | | | | | | | | | so bump the minimum version in the standalone Clang CMake project as well. As I mentioned on the LLVM commit version of this, if this causes any trouble for folks, just let me know. I'm trying to avoid re-implementing functionality in CMake, but I will if there are problems using the newer versions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199152 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the standalone Clang CMake bits about the flag to force using anChandler Carruth2014-01-13
| | | | | | | old toolchain to build. The toolchain version is now checked in HandleLLVMOptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199150 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/cfe/trunk@199076 91177308-0d34-0410-b5e6-96231b3b80d8
* Build fix following r198747Alp Toker2014-01-08
| | | | | | | | | | | Convert CMake CLANG_BUILD_EXAMPLES to a boolean value for consumption by Python, otherwise the raw config string gets passed through which may not be 0/1. The if/else matches the technique used to solve the problem in LLVM's own CMakeLists.txt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198750 91177308-0d34-0410-b5e6-96231b3b80d8
* Add tests for clang pluginsAlp Toker2014-01-08
| | | | | | | | | | | | | | | Somehow the entire plugin infrastructure went wholly untested until now. The only plugins available for use in testing are the examples, so plugin tests will only be run if CLANG_BUILD_EXAMPLES is enabled in the build. (The examples should really be enabled by default, not just to aid testing but also to prevent bitrot in some key user-facing code. I'll propose that shortly.) Requires supporting changes in LLVM r198746. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198747 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Add missing set_output_directory after Takumi's change in r198205.Jordan Rose2014-01-02
| | | | | | | | | | In a standalone build, Clang binaries should end up in Clang's build folder, not LLVM's. Xcode still has a few issues finding auxiliary tools and libraries in the build folders. I'll fix those next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198328 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/cfe/trunk@198205 91177308-0d34-0410-b5e6-96231b3b80d8
* Port r198088 (set NO_DEAD_STRIP for clang) from make to cmake.Nico Weber2013-12-30
| | | | | | | | | Also stop setting passing -dead_strip explicitly for libclang and instead rely on this now happening by default. (And make it happen by default for add_clang_library, which doesn't use the library cmake functions from llvm.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198200 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Set in LLVM_EXPORTED_SYMBOL_FILE PrintFunctionNames/CMakeLists.txt.Nico Weber2013-12-29
| | | | | | | | The corresponding Makefile sets it too. Also tweak add_clang_library to support LLVM_EXPORTED_SYMBOL_FILE for modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198185 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVM_EXPORTED_SYMBOL_FILE in libclang's cmake build.Nico Weber2013-12-29
| | | | | | | Now the exports file should have an effect on non-darwin too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198176 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Tweak r197697 to handle CMake finding the wrong llvm-config/tblgen.Jordan Rose2013-12-19
| | | | | | | | | | | - If llvm-config fails, output an error to the user rather than allowing errors to cascade. - Always get llvm-tblgen from llvm-config's bindir. Turns out my PATH points to a really old version of LLVM; both of these fell out of trying to make this experience nicer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197714 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Standalone] Rewrite standalone build based on llvm-config. ↵NAKAMURA Takumi2013-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLANG_PATH_TO_LLVM_*(s) are deprecated. Checked on VS10(multiconfig) and some singleconfig builders. * Assumptions - You should specify llvm-config as LLVM_CONFIG. CMake could find one in $PATH by default. - ENABLE_ASSERTIONS obeys LLVM's. * Use cases a) With LLVM build tree Assume llvm-config is in your build tree. Everything should work as ever. b) With *installed* LLVM Assume distributions. The source tree can be optional. b1) The source tree is provided on the location `llvm-config --src-root` - Test utils, FileCheck &c., are imported and built in the new tree. - Gtest is built in the tree if gtest library is not found. - Lit is used in $(SRCROOT)/utils/lit/lit.py. b2) The source tree is not provided - clang and utilities can be built. - All tests, unittests and check-clang are invalidated and not built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197697 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] check-clang: Include ClangUnitTests if it can be built. Check ↵NAKAMURA Takumi2013-12-19
| | | | | | existence of gtest.h then. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197688 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Standalone] Import LLVM_LIT_TOOLS_DIR.NAKAMURA Takumi2013-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197461 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Standalone] Fix llvm-tblgen's directory to use LLVM_TOOLS_BINARY_DIR ↵NAKAMURA Takumi2013-12-17
| | | | | | | | | | instead of LLVM_BINARY_DIR. LLVM_BINARY_DIR points OBJROOT. FIXME: llvm-config should show *real* bindir with --bindir. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197460 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Standalone] Fixup r197395 for standalone build.NAKAMURA Takumi2013-12-17
| | | | | | Standalone scripts shall be rewritten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197459 91177308-0d34-0410-b5e6-96231b3b80d8
* In a standalone Clang build, default to building tests, like LLVM doesDmitri Gribenko2013-12-16
| | | | | | | | LLVM_INCLUDE_TESTS is set in the top-level LLVM CMakeLists, which is not being executed when Clang is built in a separate directory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197423 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.NAKAMURA Takumi2013-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197395 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Some changes on the linker options for libclang on a CMake build.Argyrios Kyrtzidis2013-11-06
| | | | | | | | - Use the 'libclang.exports' file. - Pass -Wl,-current_version - Set install name to "@rpath" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194134 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert commits r190613, r190560 and r190557.Rafael Espindola2013-10-01
| | | | | | The added a cmake invocation to null builds, making them a lot slower. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191784 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Put controversial always-recheck-revision-number behind an option.Jordan Rose2013-09-12
| | | | | | | | | | | | | | | CMake does not have the ability to perform actions before calculating dependencies, so it can't know whether it needs to rebuild clangBasic to update for a new revision number. CLANG_ALWAYS_CHECK_VC_REV (off by default) will cause clangBasic to always be dirty by deleting the generated SVNVersion.inc after use; otherwise, SVNVersion.inc will always be updated, but only included in the final binary when clangBasic is rebuilt. It'd be great to find a better way to do this, but hopefully this is still an improvement over the complete lack of version information before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190613 91177308-0d34-0410-b5e6-96231b3b80d8
* [doxygen] Added code for generating doxygen documentation for clang for cmake.Michael Gottesman2013-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189508 91177308-0d34-0410-b5e6-96231b3b80d8
* Use set to create CLANG_ORDER_FILE instead of option which implies a bool value.Michael Gottesman2013-08-27
| | | | | | Patch by Edoardo P. <ed0.88.prez@gmail.com>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189311 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: support the LLVM_INSTALL_TOOLCHAIN_ONLY flagHans Wennborg2013-08-24
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1498 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189156 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename CMake variable; this fell out of r189127 somehow.Hans Wennborg2013-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189129 91177308-0d34-0410-b5e6-96231b3b80d8