aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2013-04-22cmake: Only add -pedantic if LLVM didn't add it. Don't unconditionally addRichard Smith
-Wall -W, since it's already provided by LLVM's cmake config, and that overrides fixes (such as -Wno-uninitialized) which LLVM's cmake setup may have provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180018 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-02CMake: -Wno-nested-anon-types for Clang.Jordan Rose
In LLVM, -pedantic is not set unless LLVM_ENABLE_PEDANTIC is set. However, Clang's CMakeLists.txt unilaterally adds -pedantic to the run line, so we need to disable -Wnested-anon-types explicitly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176393 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26Define CMake option CLANG_INCLUDE_TESTS *before* traversing into tests/ ↵Alexey Samsonov
subdirectory. Otherwise, while configuring the build tree for the first time, Clang unit tests could avoid being added to 'check-clang' command, and thus avoid being built and executed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176080 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08CMake: Include Clang unit tests in check-clang target in standalone builds.Jordan Rose
Also, remove CLANG_BUILD_TESTS option. It won't have consistent behavior between standalone and non-standalone builds, so I'm not going to bother hooking it up for standalone builds. LLVM_BUILD_TESTS will continue to control unit test inclusion in the "all" target in non-standalone builds. Finally, fix the default value of CLANG_INCLUDE_TESTS, which was being set to the boolean value of "LLVM_INCLUDE_TESTS", i.e. OFF, rather than actually reading the variable ${LLVM_INCLUDE_TESTS}! If you picked up my earlier commit, YOU WILL HAVE TO MANUALLY SET THIS OPTION BACK ON. My apologies! Part two of r174691 (allow the unit tests to be built in standalone mode). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174698 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08CMake: Optionally allow running the Clang unit tests in standalone builds.Jordan Rose
The reason this is not enabled by default is because there is no way for Clang to guarantee that the LLVM unit testing infrastruture has been built. However, if it /has/ been built, there's no reason why the standalone Clang build can't use it! This should have no effect on existing builds -- in a combined build the value of the CLANG_INCLUDE_TESTS option defaults to the LLVM equivalent, and in a standalone build it defaults to off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174691 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18CMake: Make sure to detect LibXml2 when Clang is built standaloneDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170444 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-14[CMake] Move libxml2 stuff from clang to llvm/cmake.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170225 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-13Update CMake build corresponding to r170135.NAKAMURA Takumi
Thanks to Saleem Abdulrasool, aka compnerd! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170136 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23CMake: Fix public header search for generating Xcode/MSVC projects.Jordan Rose
Previously, we only had support for one level of library under lib/, with the existence of the two-level lib/StaticAnalyzer/* hardcoded in the top-level CMakeLists.txt. This became a problem with split of libRewrite into several libraries -- with the same sub-names as the libraries in lib/StaticAnalyzer/. Now, we match up anything under lib/ to the corresponding directory in include/clang/. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166505 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07Fix capitalization of LibXml2 for CMake on case-sensitive file systemsDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161445 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07libclang API for comment-to-xml conversion.Dmitri Gribenko
The implementation also includes a Relax NG schema and tests for the schema itself. The schema is used in c-index-test to verify that XML documents we produce are valid. In order to do the validation, we add an optional libxml2 dependency for c-index-test. Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric Christopher. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-27clang/CMakeLists.txt: Move "examples" after building lib and tools.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09[CMake] Get rid of unconditional dependency to ClangDiagnosticCommon. Only ↵NAKAMURA Takumi
clangBasic and clangASTMatchers need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159931 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02Clone a bit of LIT flag defaults from the LLVM CMake file into theChandler Carruth
standalone section of the Clang CMake files. This will likely make the lit runs in Clang much more suitable to IDEs such as Xcode and MSVC when operating in a standalone mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159582 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth
express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06Zap the /Za compiler switch from MSVC projects, the option is considered ↵Francois Pichet
harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed. Only 1 minor code change was necessary: can't use cdecl as variable name anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158063 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16use DEFAULT_SYSROOTSebastian Pop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154792 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25CMake: install libclang.dll to $CMAKE_INSTALL_PREFIX/bin.NAKAMURA Takumi
Patch by Joe Groff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151448 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14include clang's config.h unconditionally (v2)Dylan Noblesmith
And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. Reverts r149571/restores r149504, now that config.h is generated correctly by LLVM's configure in all build configurations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150487 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-02back out r149504Dylan Noblesmith
Too many weird build failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149571 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01cmake: don't install config.h (v2)Dylan Noblesmith
This header is private and shouldn't be used by clients. (This reverts r149540, reinstating r149496. False alarm.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149550 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01cmake: revert r149496Dylan Noblesmith
It *looks* like this caused PR11903, somehow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149540 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01include clang's config.h unconditionallyDylan Noblesmith
And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. (clang r149497 / llvm r149498) Also include the config.h header after all other headers, per the LLVM coding standards. It also turns out WindowsToolChain.cpp wasn't using the config header at all, so that include's just deleted now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149504 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01cmake: don't install config.hDylan Noblesmith
This header is private and shouldn't be used by clients. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149496 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are builtPeter Collingbourne
by default, rather than whether they may be built at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149037 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06Add the Clang tblgen backends to Clang, and flip the switch to causePeter Collingbourne
the build systems to use clang-tblgen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06Clang-side build system infrastructure for multiple tblgens.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141267 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23CMake: Define ${LLVM_TABLEGEN_EXE} with explicit ${CMAKE_EXECUTABLE_SUFFIX} ↵NAKAMURA Takumi
on standalone build. Or build might fail with NMake. Thanks to Nicolas Le Gland! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140360 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02Fix cmake for r136702 (at least for the most part). Chandler has been kind Chad Rosier
enough to offer to investigate the underlying issue. Thanks to Doug for his assistance as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136719 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02Temporarily revert parts of r136702 to make cmake builds happy.Chad Rosier
Someone with more cmake experience want to throw me a bone? :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136709 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02When the compiler crashes, the compiler driver now produces diagnostic Chad Rosier
information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. rdar://9575623 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136702 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14Tweak the CMake build so that building a project just containing ClangDouglas Gregor
(and linking to an already-build LLVM) works with Xcode. The resulting Xcode project for Clang is quite a bit smaller and builds/loads faster. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135216 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-08Revert "hack in my new variables for GCC"Chandler Carruth
Very sorry for the accidental commit of WIP code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132745 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-08hack in my new variables for GCCChandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132743 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20CMake: add support for CLANG_VENDOR. PR9966.Oscar Fuentes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131733 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11Handle gcc-compatible compilers (such as clang) the same way we handleOscar Fuentes
gcc. Fixes PR9886. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131182 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10Reflect rename on LLVM cmake file.Oscar Fuentes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129246 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-29CMake: removed some unnecesary conditionals from add_clang_library.Oscar Fuentes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128483 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-26Removed workaround for unspecified build problem on MinGW.Oscar Fuentes
Tested that MinGW/MSYS builds fine without that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128341 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17Fix some issues with include directories: remove a duplicate and putOscar Fuentes
Clang binary and source directories first (on that order). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127822 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28CMake: [PR9321] Don't install include/clang/**/*.td.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126633 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25CMake: add version information into the clang executable and libclangDouglas Gregor
shared library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25LLVM_INCLUDE_TESTS applies to unit tests, not the normal Clang testsDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126458 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25Don't include Clang's unit tests if LLVM's unit tests aren't being builtDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126455 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21CMake: Eliminate duplicate -D__STDC_LIMIT_MACROS and ↵NAKAMURA Takumi
-D__STDC_CONSTANT_MACROS. llvm/cmake/modules/HandleLLVMOptions.cmake defines them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126105 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20Put targets on folders, if the IDE supports the feature.Oscar Fuentes
Requires CMake 2.8.3 or newer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126094 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20New function for tablegenning: clang_tablegen.Oscar Fuentes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126093 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18More correct fix for CMake breakage I was seeing, my buildbots useDaniel Dunbar
LLVM_INCLUDE_TESTS:=OFF, which may no longer be necessary for all I know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125985 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16CMake: Tweak for Visual Studio 10 quirk at clang-standalone build.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125647 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15Add CMake support to the clang unittests.Jeffrey Yasskin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125561 91177308-0d34-0410-b5e6-96231b3b80d8