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
This commit is contained in:
Michael J. Spencer
2010-09-24 19:10:51 +00:00
parent fff606d7b2
commit 4b794c9a99
4 changed files with 28 additions and 14 deletions

View File

@@ -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()