NAKAMURA Takumi
92eb254c3c
[CMake] Move libxml2 stuff from clang to llvm/cmake.
...
llvm-svn: 170225
2012-12-14 18:30:20 +00:00
NAKAMURA Takumi
62167ca254
Update CMake build corresponding to r170135.
...
Thanks to Saleem Abdulrasool, aka compnerd!
llvm-svn: 170136
2012-12-13 16:24:59 +00:00
Jordan Rose
afaee3c3da
CMake: Fix public header search for generating Xcode/MSVC projects.
...
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/.
llvm-svn: 166505
2012-10-23 21:54:03 +00:00
Douglas Gregor
06228f273a
Fix capitalization of LibXml2 for CMake on case-sensitive file systems
...
llvm-svn: 161445
2012-08-07 20:42:31 +00:00
Dmitri Gribenko
740c0fbe0e
libclang API for comment-to-xml conversion.
...
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!
llvm-svn: 161431
2012-08-07 17:54:38 +00:00
NAKAMURA Takumi
d3f78a1458
clang/CMakeLists.txt: Move "examples" after building lib and tools.
...
llvm-svn: 160848
2012-07-27 06:17:48 +00:00
NAKAMURA Takumi
d7ba69de90
[CMake] Get rid of unconditional dependency to ClangDiagnosticCommon. Only clangBasic and clangASTMatchers need it.
...
llvm-svn: 159931
2012-07-09 14:12:20 +00:00
Chandler Carruth
e8f69b733a
Clone a bit of LIT flag defaults from the LLVM CMake file into the
...
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.
llvm-svn: 159582
2012-07-02 20:52:55 +00:00
Chandler Carruth
28969b4139
Remove a goofy CMake hack and use the standard CMake facilities to
...
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.
llvm-svn: 158888
2012-06-21 01:30:21 +00:00
Francois Pichet
b27ea02784
Zap the /Za compiler switch from MSVC projects, the option is considered 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.
llvm-svn: 158063
2012-06-06 12:00:10 +00:00
Sebastian Pop
980920a321
use DEFAULT_SYSROOT
...
llvm-svn: 154792
2012-04-16 04:16:43 +00:00
NAKAMURA Takumi
a3534f5c9a
CMake: install libclang.dll to $CMAKE_INSTALL_PREFIX/bin.
...
Patch by Joe Groff.
llvm-svn: 151448
2012-02-25 16:46:50 +00:00
Dylan Noblesmith
4d9cbffbe2
include clang's config.h unconditionally (v2)
...
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.
llvm-svn: 150487
2012-02-14 15:54:49 +00:00
Dylan Noblesmith
4f4e745725
back out r149504
...
Too many weird build failures.
llvm-svn: 149571
2012-02-02 00:40:14 +00:00
Dylan Noblesmith
5b7ba95294
cmake: don't install config.h (v2)
...
This header is private and shouldn't be used by clients.
(This reverts r149540, reinstating r149496. False alarm.)
llvm-svn: 149550
2012-02-01 22:22:37 +00:00
Dylan Noblesmith
dc3980a945
cmake: revert r149496
...
It *looks* like this caused PR11903, somehow.
llvm-svn: 149540
2012-02-01 21:17:55 +00:00
Dylan Noblesmith
86780e906b
include clang's config.h unconditionally
...
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.
llvm-svn: 149504
2012-02-01 14:25:28 +00:00
Dylan Noblesmith
c20ccdd786
cmake: don't install config.h
...
This header is private and shouldn't be used by clients.
llvm-svn: 149496
2012-02-01 13:50:22 +00:00
Peter Collingbourne
53860cfeb0
Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are built
...
by default, rather than whether they may be built at all.
llvm-svn: 149037
2012-01-26 03:33:40 +00:00
Peter Collingbourne
bee583fd6e
Add the Clang tblgen backends to Clang, and flip the switch to cause
...
the build systems to use clang-tblgen.
llvm-svn: 141291
2011-10-06 13:03:08 +00:00
Peter Collingbourne
d937a99465
Clang-side build system infrastructure for multiple tblgens.
...
llvm-svn: 141267
2011-10-06 01:52:10 +00:00
NAKAMURA Takumi
b2e55aeb45
CMake: Define ${LLVM_TABLEGEN_EXE} with explicit ${CMAKE_EXECUTABLE_SUFFIX} on standalone build. Or build might fail with NMake.
...
Thanks to Nicolas Le Gland!
llvm-svn: 140360
2011-09-23 00:52:55 +00:00
Chad Rosier
7b15b2e828
Fix cmake for r136702 (at least for the most part). Chandler has been kind
...
enough to offer to investigate the underlying issue. Thanks to Doug for his
assistance as well.
llvm-svn: 136719
2011-08-02 20:44:34 +00:00
Chad Rosier
edbb3ef902
Temporarily revert parts of r136702 to make cmake builds happy.
...
Someone with more cmake experience want to throw me a bone? :)
llvm-svn: 136709
2011-08-02 18:33:29 +00:00
Chad Rosier
be10f9853c
When the compiler crashes, the compiler driver now produces diagnostic
...
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
llvm-svn: 136702
2011-08-02 17:58:04 +00:00
Douglas Gregor
d7f2f9d07b
Tweak the CMake build so that building a project just containing Clang
...
(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.
llvm-svn: 135216
2011-07-14 23:42:32 +00:00
Chandler Carruth
2561f09c9b
Revert "hack in my new variables for GCC"
...
Very sorry for the accidental commit of WIP code.
llvm-svn: 132745
2011-06-08 10:14:38 +00:00
Chandler Carruth
0169ec0988
hack in my new variables for GCC
...
llvm-svn: 132743
2011-06-08 10:13:14 +00:00
Oscar Fuentes
aba6a3d094
CMake: add support for CLANG_VENDOR. PR9966.
...
llvm-svn: 131733
2011-05-20 15:57:59 +00:00
Oscar Fuentes
cfc9efa43e
Handle gcc-compatible compilers (such as clang) the same way we handle
...
gcc.
Fixes PR9886.
llvm-svn: 131182
2011-05-11 13:53:30 +00:00
Oscar Fuentes
643f1868de
Reflect rename on LLVM cmake file.
...
llvm-svn: 129246
2011-04-10 16:17:31 +00:00
Oscar Fuentes
fda6a4c33a
CMake: removed some unnecesary conditionals from add_clang_library.
...
llvm-svn: 128483
2011-03-29 20:51:00 +00:00
Oscar Fuentes
4f444d7c44
Removed workaround for unspecified build problem on MinGW.
...
Tested that MinGW/MSYS builds fine without that.
llvm-svn: 128341
2011-03-26 16:11:33 +00:00
Oscar Fuentes
73963b67c1
Fix some issues with include directories: remove a duplicate and put
...
Clang binary and source directories first (on that order).
llvm-svn: 127822
2011-03-17 19:03:04 +00:00
NAKAMURA Takumi
f7c666c38a
CMake: [PR9321] Don't install include/clang/**/*.td.
...
llvm-svn: 126633
2011-02-28 05:21:27 +00:00
Douglas Gregor
be8705bd3f
CMake: add version information into the clang executable and libclang
...
shared library.
llvm-svn: 126502
2011-02-25 19:24:02 +00:00
Douglas Gregor
49709e75bb
LLVM_INCLUDE_TESTS applies to unit tests, not the normal Clang tests
...
llvm-svn: 126458
2011-02-25 00:32:30 +00:00
Douglas Gregor
0e066c0238
Don't include Clang's unit tests if LLVM's unit tests aren't being built
...
llvm-svn: 126455
2011-02-25 00:12:04 +00:00
NAKAMURA Takumi
19c9fb6cbc
CMake: Eliminate duplicate -D__STDC_LIMIT_MACROS and -D__STDC_CONSTANT_MACROS. llvm/cmake/modules/HandleLLVMOptions.cmake defines them.
...
llvm-svn: 126105
2011-02-21 03:19:49 +00:00
Oscar Fuentes
15fe190027
Put targets on folders, if the IDE supports the feature.
...
Requires CMake 2.8.3 or newer.
llvm-svn: 126094
2011-02-20 22:06:44 +00:00
Oscar Fuentes
6f72540e46
New function for tablegenning: clang_tablegen.
...
llvm-svn: 126093
2011-02-20 22:06:32 +00:00
Daniel Dunbar
5423b497ab
More correct fix for CMake breakage I was seeing, my buildbots use
...
LLVM_INCLUDE_TESTS:=OFF, which may no longer be necessary for all I know.
llvm-svn: 125985
2011-02-18 22:55:32 +00:00
NAKAMURA Takumi
2ec773f772
CMake: Tweak for Visual Studio 10 quirk at clang-standalone build.
...
llvm-svn: 125647
2011-02-16 03:07:15 +00:00
Jeffrey Yasskin
cd3858b103
Add CMake support to the clang unittests.
...
llvm-svn: 125561
2011-02-15 07:54:28 +00:00
Oscar Fuentes
c9987fbbfe
Add current binary and source directories to the header search list
...
for all compiler invocations.
llvm-svn: 125514
2011-02-14 20:14:11 +00:00
Ted Kremenek
4bd19da586
Add hack to CMakeLists.txt so that StaticAnalyzer libraries find their corresponding headers.
...
This is a hack because we really should only search in the 'include/clang/StaticAnalyzer' directory
if we are in 'lib/StaticAnalyzer'. My CMake knowledge is limited, so I appeal to anyone with
more expertise.
llvm-svn: 125252
2011-02-10 01:03:09 +00:00
Oscar Fuentes
edeaf16f2c
Moved here from LLVM Clang's configuration options and related macros.
...
llvm-svn: 124825
2011-02-03 22:48:20 +00:00
Oscar Fuentes
ce8661608b
Optionally, Clang now builds using LLVM as an external library.
...
The user sets the variable CLANG_PATH_TO_LLVM_BUILD pointing to a LLVM
build directory or to a directory where LLVM was installed. When using
a non-installed LLVM build, it is necessary to set
CLANG_PATH_TO_LLVM_SOURCE as well.
llvm-svn: 124817
2011-02-03 20:57:53 +00:00
Oscar Fuentes
67cce9b135
Use some of the llvm cmake infraestructure. This takes care of
...
disabling rtti and exceptions where requested. Remove some unnecessary
code too.
llvm-svn: 122750
2011-01-03 17:00:02 +00:00
Michael J. Spencer
716d01a612
CMake: Add runtime dir.
...
llvm-svn: 121957
2010-12-16 03:28:42 +00:00
Oscar Fuentes
b3ce035c71
Copied some flags from the Makefile build to the list of GCC flags.
...
This removes a lot of warnings.
llvm-svn: 116545
2010-10-15 00:16:22 +00:00
Michael J. Spencer
09476212de
Revert "CMake: Update to use standard CMake dependency tracking facilities instead"
...
This reverts commit r113631
Conflicts:
CMakeLists.txt
lib/CodeGen/CMakeLists.txt
llvm-svn: 113817
2010-09-13 23:54:41 +00:00
Michael J. Spencer
9efc54890d
CMake: Fix mingw32 build.
...
llvm-svn: 113677
2010-09-11 02:13:48 +00:00
Michael J. Spencer
0881f4a367
CMake: Update to use standard CMake dependency tracking facilities instead
...
of whatever we were using before...
llvm-svn: 113631
2010-09-10 21:13:16 +00:00
Daniel Dunbar
d7e887fb7f
clang: Derive version name from LLVM unless specified explicitly. This means
...
clang is now clang 2.8.
llvm-svn: 106914
2010-06-25 23:34:47 +00:00
Daniel Dunbar
c3275c5440
build: Add a generated Version.inc file instead of duplicating information.
...
llvm-svn: 106863
2010-06-25 17:33:46 +00:00
Douglas Gregor
61b5ff5ab4
Teach the PrintFunctionNames example to be a proper module, so that
...
Clang can load it as a plugin. Original fix by Troy D. Straszheim,
which I extended with Darwin support. Fixes PR6801.
llvm-svn: 105630
2010-06-08 19:23:49 +00:00
Chris Lattner
7d9e03ad5b
exclude cmake build directories from being installed
...
with "make install". Patch by Michael Forney!
llvm-svn: 102299
2010-04-25 04:59:35 +00:00
Chandler Carruth
13bca6cd5a
Prevent accidental in-source builds with CMake, and detect when there are
...
generated files from a previous in-source builds.
llvm-svn: 101665
2010-04-17 20:12:02 +00:00
Kovarththanan Rajaratnam
8841e86d11
Include *.inc in install target
...
Fixes PR6755.
llvm-svn: 100105
2010-04-01 14:24:41 +00:00
Daniel Dunbar
2c88b01bb6
Add optional CMake build for Clang examples, patch by Kovarththanan Rajaratnam.
...
llvm-svn: 89078
2009-11-17 09:32:51 +00:00
Oscar Fuentes
e814afd7b0
Rather than excluding quite some things, and still installing
...
CMakeLists.txt, Makefiles, ... it's better to whitelist what we really
want to install.
Patch by Ingmar Vanhassel!
llvm-svn: 85283
2009-10-27 19:59:34 +00:00
Oscar Fuentes
e6fc25321f
CMake: Append LLVM_LIBDIR_SUFFIX to library destination.
...
Based on a patch by Ingmar Vanhassel.
llvm-svn: 85276
2009-10-27 19:42:21 +00:00
Benjamin Kramer
3ce29858e9
CMake mingw build fixes.
...
- llvm's libs must be linked after clang's
- libLLVMSystem depends on psapi on win32 (get_system_libs has it)
- CIndex builds successfully on mingw now
llvm-svn: 83773
2009-10-11 12:22:00 +00:00
Douglas Gregor
43bc1a7483
CMake build support for libCIndex and c-index-test. The indexing tests
...
are now running properly from within CMake.
llvm-svn: 82755
2009-09-25 06:35:15 +00:00
Douglas Gregor
bd1af01fcd
Make the GCC warning flags passed by CMake the same as the warning flags passed in the make build
...
llvm-svn: 82221
2009-09-18 14:47:57 +00:00
Daniel Dunbar
f8d26ad3a3
Add CLANG_{SOURCE,BINARY}_DIR cmake variables.
...
llvm-svn: 82098
2009-09-17 00:07:10 +00:00
Douglas Gregor
24f01f1251
The CMake build system now derives the Clang version number from VER.
...
llvm-svn: 82085
2009-09-16 21:59:05 +00:00
Mike Stump
b4bed3a497
Collapse more clang version numbers down into fewer places.
...
llvm-svn: 81983
2009-09-16 01:26:05 +00:00
Douglas Gregor
e26d4e49df
Update Clang version for CMake
...
llvm-svn: 81938
2009-09-15 22:30:13 +00:00
Douglas Gregor
33870d908f
CMake: Improve installation of Clang
...
- Install clang-cc into libexec
- Install headers into lib/clang/<version>/include
- Don't install other clang-based tools (clang-wpa, clang-index, etc.)
llvm-svn: 79827
2009-08-23 05:28:29 +00:00
Douglas Gregor
4bf38785b1
Make sure that .td and .def files get into the list of headers in a CMake build, for use in Xcode and Visual Studio
...
llvm-svn: 73623
2009-06-17 18:31:02 +00:00
Oscar Fuentes
6c0c09dcbb
CMake: New variable LLVM_LIBDIR_SUFFIX.
...
Patch by Ingmar Vanhassel!
llvm-svn: 73217
2009-06-12 02:54:12 +00:00
Douglas Gregor
0770532f5a
First cut at regression testing Clang with CMake
...
llvm-svn: 72945
2009-06-05 16:00:31 +00:00
Ted Kremenek
a87b8a9a72
CMake: Also include header files in target when the generator is 'XCode'.
...
llvm-svn: 67703
2009-03-25 20:34:07 +00:00
Daniel Dunbar
e5a7ecc23a
Move <root>/Driver into <root>/tools/clang-cc.
...
Again, I tried to update cmake but it is untested.
llvm-svn: 67605
2009-03-24 03:00:12 +00:00
Daniel Dunbar
3db73ab7f6
Add CMake files for tools/driver; I am just guessing here, can someone test/fix?
...
llvm-svn: 67604
2009-03-24 02:52:57 +00:00
Douglas Gregor
23d75bb326
Build system changes to use TableGen to generate the various
...
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:
- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.
I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.
llvm-svn: 67058
2009-03-16 23:06:59 +00:00
Sebastian Redl
4ae9b126fe
Revert the switch to the tablegen diags. It fails for seperate objdir builds and cmake builds, and I have no clue what to do about it. Revisit this after someone with a clue about the build systems has looked at it.
...
llvm-svn: 67009
2009-03-14 15:58:54 +00:00
Sebastian Redl
51e037e3c4
Switch diagnostics from .def to tablegen files. Please validate the Windows build.
...
llvm-svn: 67007
2009-03-14 12:00:12 +00:00
Cedric Venet
c41deefec7
Add /Za to all MSVC build of a clang libraries.
...
This allow to use the new move emulation for smart pointer by disabling language extension.
llvm-svn: 60979
2008-12-13 11:00:04 +00:00
Chris Lattner
c3b41e31fb
"a patch telling cmake to install clang headers in the target
...
install directory"
Patch by Lukasz Janyst!
llvm-svn: 59059
2008-11-11 18:39:10 +00:00
Cedric Venet
1bb549685b
Add header files to CMake build solution. It use globing so it doesn't need to be manually maintained, but it won't automatically detect a new header. I think this is a good compromise for the header files, since there presence in the solution is just an help for the user. Moreover, a new header is often introduced with a new cpp source file which need a makefile change, which will regenerate the solution and detect the new header.
...
llvm-svn: 58566
2008-11-02 16:28:53 +00:00
Oscar Fuentes
07d9f9a6ec
CMake: Builds and installs clang binary and libs (no docs yet). It
...
must be under the `tools' subdirectory of the LLVM *source* tree.
llvm-svn: 58180
2008-10-26 00:56:18 +00:00