Commit Graph

69 Commits

Author SHA1 Message Date
Jordan Rose 08bf4fd345 CMake: Include Clang unit tests in check-clang target in standalone builds.
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).

llvm-svn: 174698
2013-02-08 07:28:25 +00:00
NAKAMURA Takumi 61a8f974a7 [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.
For example,
cur) unittests/ADT/Release/ADTTests
new) unittests/ADT/ADTTests

RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR.

With Make and Ninja, the tree is not built with multiple configurations.
Then, including the build type in target directory doesn't make sense.
See also "How can I build multiple modes without switching?"
http://www.cmake.org/Wiki/CMake_FAQ
CMAKE_CFG_INTDIR is set to "."

With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example,
unittests/ADT/Release/ADTTests.exe
CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)".

Thus, "--param build_config" is also deprecated.

llvm-svn: 173616
2013-01-27 12:20:50 +00:00
NAKAMURA Takumi df0b43d1f9 clang/test: [CMake] check-clang doesn't require llvm-dis any more.
llvm-svn: 173116
2013-01-22 01:52:04 +00:00
Alexander Kornienko cdc3987ca8 Removed standalone clang-ast-dump tool.
llvm-svn: 160772
2012-07-26 01:44:18 +00:00
Alexander Kornienko f2f82550fd The new clang-ast-dump tool for selective AST dumping. Moved common command-line tool stuff to CommandLineClangTool
llvm-svn: 160265
2012-07-16 12:46:48 +00:00
Chandler Carruth dc2e4bcad3 Extend a workaround for a CMake bug in LLVM's r159593 to apply to
a Clang target which hits the same bug directly.

llvm-svn: 159598
2012-07-02 21:46:03 +00:00
Chandler Carruth 3bf1d5d1de We support a mode where the Clang regression tests are run but not the
Clang unit tests. It's not clear why we support this mode in builds
where LLVM is available (LLVM itself does not), but at least this makes
us support it correctly.

This also fixes a long-standing bug where we would pass the unit test
param flag to lit in the standalone build even though the standalone
build *never* has the unittests built and ready for testing.

llvm-svn: 159594
2012-07-02 21:37:04 +00:00
Chandler Carruth 6b963db39a Switch from using a lit.cfg-generator variable to the real variable in
the standalone mode. We've changed scoping and sequencing of variables
being defined and that cause this to start to be unset breaking some
cmake users. Thanks to Jordan Rose for the report.

The fix also makes the condition on the preceding line much more
sensible. =D

llvm-svn: 159576
2012-07-02 20:14:59 +00:00
Chandler Carruth 8a6290721e Switch Clang to use the new common LLVM CMake infrastructure for adding
lit testsuites. This sinks all management of the aggregate lit runs into
the LLVM CMake files, making Clang only responsible for declaring its
own testsuite. In the process we fix numerous "bugs" where the proper
method of invoking lit has changed over time, and the old system
encoded several broken artifacts of this in ABIs and compatibility
tests.

It also switches to 'check-clang' for the canonical name of the test
suite, although 'clang-test' remains as an alias.

The situation when Clang is being built in standalone mode is little
changed. It replicates just enough of the lit setup to cope with the
oddities of being run outside of an LLVM build.

llvm-svn: 159483
2012-06-30 10:14:27 +00:00
Chandler Carruth 8279aa7825 Switch Clang's CMake lit.site.cfg generation over to use the common
helpers rather than its own special-rolled code.

llvm-svn: 159398
2012-06-29 00:39:23 +00:00
Chandler Carruth 9d76f27786 Remove a completely unused and remarkably inaccurate list of test
directories from the cmake file. Dunno what the history is here, but
we're not using it.

More refactorings to come here.

llvm-svn: 159261
2012-06-27 10:06:26 +00:00
Chandler Carruth c0674c1fda Update the Clang CMake build to reflect the name change in LLVM r159258.
llvm-svn: 159260
2012-06-27 09:49:07 +00:00
Manuel Klimek 750caacbb2 Add the dependency on clang-check to clang-test, so clang-check
can be integration tested.

llvm-svn: 154009
2012-04-04 12:18:22 +00:00
NAKAMURA Takumi 185de44959 CMake: Promote the testing targets out of folders on IDE.
llvm-svn: 149220
2012-01-30 03:15:47 +00:00
Peter Collingbourne 5bad4afa2f CUDA: set proper calling conventions for PTX
llvm-svn: 141296
2011-10-06 16:49:54 +00:00
NAKAMURA Takumi f665ce60c2 CMake: "clang-test" may not depend on check.deps.
...I believe it would not break anything...

FIXME: "check-all" may not be generated w/o LLVM_INCLUDE_TESTS.
llvm-svn: 137709
2011-08-16 03:45:31 +00:00
Ted Kremenek 228b5fefbb Add diagtool-based test where we enforce that no additional warnings can be added to Clang without a -W flag.
llvm-svn: 137369
2011-08-11 22:06:55 +00:00
NAKAMURA Takumi 6657e979f5 test/CMakeLists.txt: Re-indent.
llvm-svn: 135591
2011-07-20 16:35:49 +00:00
Douglas Gregor 653b51a938 Don't refer to check.deps unless LLVM_INCLUDE_TESTS is enabled
llvm-svn: 135300
2011-07-15 21:03:20 +00:00
NAKAMURA Takumi 43ab08340b test/CMakeLists.txt: clang-test may depend on llc when LLVM is built together.
llvm-svn: 134874
2011-07-10 17:45:28 +00:00
NAKAMURA Takumi 797bac56ad test/CMakeLists.txt: Fix ClangUnitTests to be built with clang-test and check-all.
llvm-svn: 134873
2011-07-10 17:45:23 +00:00
NAKAMURA Takumi ad43b8fe58 test/CMakeLists.txt: Add missing c-arcmt-test to clang-test.deps.
llvm-svn: 134851
2011-07-09 23:36:37 +00:00
Andrew Trick 72d91dd6e4 cmake+lit: final cleanup related to the recent churn
llvm-svn: 133730
2011-06-23 18:00:48 +00:00
Andrew Trick fc0bb5855b Only do config-time substitution of LLVM_BUILD_MODE in
test/lit.site.cfg, not Unit/test/lit.site.cfg.

llvm-svn: 133609
2011-06-22 05:44:01 +00:00
Chandler Carruth 55b42d5ad4 Add another dependency to the clang-test CMake target, this time to support lit.
llvm-svn: 133138
2011-06-16 02:21:11 +00:00
Chandler Carruth d8bc97c644 Add the new arcmt-test tool to the clang-test dependencies with
c-index-test and friends. This brings the failures on CMake clang tests
from 23 to 2 on Linux.

llvm-svn: 133137
2011-06-16 02:01:48 +00:00
Douglas Gregor 7b0dfb3ac5 Remove the clang-test-XXX targets from the CMake builds; they really aren't useful
llvm-svn: 131728
2011-05-20 15:01:17 +00:00
Douglas Gregor 4d0779a754 Nth time's a charm?
llvm-svn: 126461
2011-02-25 00:46:48 +00:00
Douglas Gregor 61e58aecbc CMake target check.deps only exists when LLVM_INCLUDE_TESTS
llvm-svn: 126460
2011-02-25 00:43:05 +00:00
NAKAMURA Takumi ff75d8d502 CMake: Don't use ${CMAKE_CFG_INTDIR} for installed llvm-lit on Visual Studio.
llvm-svn: 126310
2011-02-23 12:07: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
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
Daniel Dunbar 7ba92d716a Unbreak CMake build on MSVC9, chapuni please check.
Without this I get:
--
-- Generating done
CMake Error: Unknown Target referenced : check.deps
CMake Error: Target: check-all depends on unknown target: check.deps
--

llvm-svn: 125976
2011-02-18 22:24:23 +00:00
NAKAMURA Takumi 84f2500eb8 test/CMakeLists.txt: Don't depend on llvm toolchain at clang-standalone build.
llvm-svn: 125646
2011-02-16 03:07:10 +00:00
Peter Collingbourne e87167b7d8 OpenCL: semantic analysis support for cl_khr_fp64 extension
llvm-svn: 125588
2011-02-15 19:46:23 +00:00
Jeffrey Yasskin cd3858b103 Add CMake support to the clang unittests.
llvm-svn: 125561
2011-02-15 07:54:28 +00:00
Peter Collingbourne 7ce13fc940 OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas.  Patch originally by ARM.

llvm-svn: 125475
2011-02-14 01:42:53 +00:00
Oscar Fuentes 82a0d26294 Support running tests from the VS IDE and XCode.
Untested, but should work :)

llvm-svn: 124975
2011-02-05 21:37:51 +00:00
Oscar Fuentes 84cb3947e5 Support `make clang-test' when Clang is compiled outside of LLVM.
This may not work on build platforms that place the binaries on
special folders ($build_dir/bin/Release/) such as the VS IDE and
XCode. For fixing this it is necessary to add a lit.py configuration
option for saying where the Clang binaries are, and apply to that path
the same magit that is used with the path to the LLVM tools binary
directory. Doing this requires a bit of autoconf work.

llvm-svn: 124969
2011-02-05 19:08:56 +00:00
NAKAMURA Takumi 22ec6604f6 CMake: Fix test. CMake has not built unittests yet.
llvm-svn: 124787
2011-02-03 09:01:12 +00:00
NAKAMURA Takumi b761ee687f Add dependency to "make clang-test check-all".
llvm-svn: 121458
2010-12-10 02:58:03 +00:00
Peter Collingbourne 6ab610ce57 Basic, Sema: add support for CUDA location attributes
llvm-svn: 120545
2010-12-01 03:15:31 +00:00
NAKAMURA Takumi c66906a6cb test/CMakeLists.txt: Implement the target "check-all". For now, it has no dependencies.
llvm-svn: 120280
2010-11-29 01:18:56 +00:00
NAKAMURA Takumi 78e3fdb8a7 test/CMakeLists.txt: Use ${LLVM_LIT_ARGS} and remove redundant arguments "-sv" and "--no-progress-bar".
llvm-svn: 118777
2010-11-11 04:09:51 +00:00
Daniel Dunbar 328913c17d CMake: Clang test targets depend on the {FileCheck,not,count} tools.
llvm-svn: 109816
2010-07-29 22:57:17 +00:00
Ted Kremenek 8590544ea8 Add test cases for r98003 and r98006.
llvm-svn: 98008
2010-03-08 23:38:27 +00:00
Chandler Carruth 0354bf4405 Remove a few more references to index-test; this was killed in r94210.
llvm-svn: 94522
2010-01-26 05:36:44 +00:00
Daniel Dunbar 3c6d1b52a0 Remove clang-cc tool, it has joined in unholy union with clang.
- tools/driver will be renamed to tools/clang at some point.

llvm-svn: 91195
2009-12-12 00:56:47 +00:00
Daniel Dunbar 7b8fcadf68 CMake: Add support for running tests with valgrind.
llvm-svn: 89625
2009-11-22 21:55:22 +00:00
Daniel Dunbar 3b339a3aa3 Simplify.
llvm-svn: 86456
2009-11-08 09:46:39 +00:00