Commit Graph

10 Commits

Author SHA1 Message Date
Jordan Rose ee9808dfdf [CMake] Fix installation without CLANG_BUILD_EXAMPLES
When CLANG_BUILD_EXAMPLES is not on we set the EXCLUDE_FROM_ALL
directory property for the examples/ directory to tell CMake not to
build them by default.  The AddLLVM.cmake APIs are not aware of this and
try to install targets that are not built.  This does not cause an
install-time error because CMake excludes the directory from the default
installation.  However, now that installation attaches targets to the
LLVMExports export set CMake-based applications that find_package(LLVM)
fail because the example plugin binary is not available.

Tell the AddLLVM.cmake APIs to exclude the examples from installation by
setting the EXCLUDE_FROM_ALL variable they check.

Patch by Brad King!

llvm-svn: 201799
2014-02-20 17:43:31 +00:00
NAKAMURA Takumi a050e3e9bd [CMake] Suppress SampleAnalyzerPlugin w/o ENABLE_STATIC_ANALYZER.
llvm-svn: 200532
2014-01-31 11:19:09 +00:00
Peter Collingbourne 9251b7d873 Honour CLANG_BUILD_EXAMPLES correctly, by setting the directory's
EXCLUDE_FROM_ALL property.

llvm-svn: 156090
2012-05-03 19:11:45 +00:00
Dylan Noblesmith 01b2c9e82f examples/analyzer-plugin: hook up to build
This was never being compiled at all and was bitrotting
as a result.

Also compile SampleAnalyzerPlugin as a module, not a library,
and fix a mistake with not passing the source files
to add_clang_library().

llvm-svn: 150378
2012-02-13 12:32:15 +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
Manuel Klimek 8a160cc42b Reverts the Tooling changes as requested by Chris.
llvm-svn: 132462
2011-06-02 16:58:33 +00:00
Manuel Klimek 6825eebcd6 This is the next step in building the standalone tools infrastructure:
This patch simplifies writing of standalone Clang tools. As an
example, we add clang-check, a tool that runs a syntax only frontend
action over a .cc file. When you integrate this into your favorite
editor, you get much faster feedback on your compilation errors, thus
reducing your feedback cycle especially when writing new code.

The tool depends on integration of an outstanding patch to CMake to
work which allows you to always have a current compile command
database in your cmake output directory when you set
CMAKE_EXPORT_COMPILE_COMMANDS.

llvm-svn: 130306
2011-04-27 16:39:14 +00:00
Daniel Dunbar 468f5cb8ea Remove wpa 'example', it isn't being maintained.
llvm-svn: 110809
2010-08-11 15:21:41 +00:00
Kovarththanan Rajaratnam 9a3f55c2a4 Wire up Daniel's new spiffy C interpreter into the CMake build system
llvm-svn: 97311
2010-02-27 07:46:49 +00:00
Daniel Dunbar 53f6f61c95 Add missed CMake file for adding clang examples to CMake build.
llvm-svn: 89080
2009-11-17 09:40:40 +00:00