Document LLVM_BUILD_TESTS, LLVM_INCLUDE_TESTS. New convenience target
authorOscar Fuentes <ofv@wanadoo.es>
Thu, 28 Oct 2010 14:38:35 +0000 (14:38 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Thu, 28 Oct 2010 14:38:35 +0000 (14:38 +0000)
UnitTests for building all the unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117545 91177308-0d34-0410-b5e6-96231b3b80d8

docs/CMake.html
unittests/CMakeLists.txt

index 491f0afd8b9891fe231add8de5c146d145f074df..2f2af24f6f44fba3fbc3e069b3534779b0ac77cc 100644 (file)
     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>
 
index df51bf821f8a809c8796a09b0f3855952f734c54..a2eed42dc348f51cae592074b53d10399580de46 100644 (file)
@@ -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)