aboutsummaryrefslogtreecommitdiff
path: root/utils/unittest/CMakeLists.txt
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-09-24 19:10:51 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-09-24 19:10:51 +0000
commit4b794c9a9990fdea831966c7ebd3be46efe261a1 (patch)
tree2917a166e0c6a1c1d7b8e5cb03d15cfb9b70f746 /utils/unittest/CMakeLists.txt
parentfff606d7b2d65495050360056acc65ec667a93b5 (diff)
CMake: Don't include tools, unittets, or examples as available targets
unless LLVM_INCLUDE_X is ON. LLVM_BUILD_X implies LLVM_INCLUDE_X git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/unittest/CMakeLists.txt')
-rw-r--r--utils/unittest/CMakeLists.txt24
1 files changed, 13 insertions, 11 deletions
diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt
index 7068546301..99741c8f05 100644
--- a/utils/unittest/CMakeLists.txt
+++ b/utils/unittest/CMakeLists.txt
@@ -20,15 +20,17 @@ if(WIN32)
add_definitions(-DGTEST_OS_WINDOWS=1)
endif()
-add_llvm_library(gtest
- googletest/gtest.cc
- googletest/gtest-death-test.cc
- googletest/gtest-filepath.cc
- googletest/gtest-port.cc
- googletest/gtest-test-part.cc
- googletest/gtest-typed-test.cc
- )
+if (LLVM_INCLUDE_TESTS OR LLVM_BUILD_TESTS)
+ add_llvm_library(gtest
+ googletest/gtest.cc
+ googletest/gtest-death-test.cc
+ googletest/gtest-filepath.cc
+ googletest/gtest-port.cc
+ googletest/gtest-test-part.cc
+ googletest/gtest-typed-test.cc
+ )
-add_llvm_library(gtest_main
- UnitTestMain/TestMain.cpp
- )
+ add_llvm_library(gtest_main
+ UnitTestMain/TestMain.cpp
+ )
+endif()