summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2010-10-28 14:38:35 +0000
committerOscar Fuentes <ofv@wanadoo.es>2010-10-28 14:38:35 +0000
commitb1f9380cac66fa478f8463788c98484cab77149b (patch)
treeb46bd93b2842d12b145415eb2df936192f7712e9 /llvm
parent6f23eb380d2e16d01f90e846973de90c8fe77ffe (diff)
downloadbcm5719-llvm-b1f9380cac66fa478f8463788c98484cab77149b.tar.gz
bcm5719-llvm-b1f9380cac66fa478f8463788c98484cab77149b.zip
Document LLVM_BUILD_TESTS, LLVM_INCLUDE_TESTS. New convenience target
UnitTests for building all the unit tests. llvm-svn: 117545
Diffstat (limited to 'llvm')
-rw-r--r--llvm/docs/CMake.html14
-rw-r--r--llvm/unittests/CMakeLists.txt3
2 files changed, 17 insertions, 0 deletions
diff --git a/llvm/docs/CMake.html b/llvm/docs/CMake.html
index 491f0afd8b9..2f2af24f6f4 100644
--- a/llvm/docs/CMake.html
+++ b/llvm/docs/CMake.html
@@ -272,6 +272,20 @@
ON. You can use that option for disabling the generation of build
targets for the LLVM examples.</dd>
+ <dt><b>LLVM_BUILD_TESTS</b>:BOOL</dt>
+ <dd>Build LLVM unit tests. Defaults to OFF. Targets for building
+ each unit test are generated in any case. You can build a specific
+ unit test with the target <i>UnitTestNameTests</i> (where at this
+ time <i>UnitTestName</i> can be ADT, Analysis, ExecutionEngine,
+ JIT, Support, Transform, VMCore; see the subdirectories
+ of <i>unittests</i> for an updated list.) It is possible to build
+ all unit tests with the target <i>UnitTests</i>.</dd>
+
+ <dt><b>LLVM_INCLUDE_TESTS</b>:BOOL</dt>
+ <dd>Generate build targets for the LLVM unit tests. Defaults to
+ ON. You can use that option for disabling the generation of build
+ targets for the LLVM unit tests.</dd>
+
<dt><b>LLVM_ENABLE_THREADS</b>:BOOL</dt>
<dd>Build with threads support, if available. Defaults to ON.</dd>
diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt
index df51bf821f8..a2eed42dc34 100644
--- a/llvm/unittests/CMakeLists.txt
+++ b/llvm/unittests/CMakeLists.txt
@@ -10,8 +10,11 @@ function(add_llvm_unittest test_name)
set(EXCLUDE_FROM_ALL ON)
endif()
add_llvm_executable(${test_name}Tests ${ARGN})
+ add_dependencies(UnitTests ${test_name}Tests)
endfunction()
+add_custom_target(UnitTests)
+
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
set(LLVM_REQUIRES_RTTI 1)
add_definitions(-DGTEST_HAS_RTTI=0)
OpenPOWER on IntegriCloud