99741c8f056e28479f9da5a28857d3f37c635c4e
[oota-llvm.git] / utils / unittest / CMakeLists.txt
1 ########################################################################
2 # Experimental CMake build script for Google Test.
3 #
4 # Consider this a prototype.  It will change drastically.  For now,
5 # this is only for people on the cutting edge.
6 #
7 # To run the tests for Google Test itself on Linux, use 'make test' or
8 # ctest.  You can select which tests to run using 'ctest -R regex'.
9 # For more options, run 'ctest --help'.
10 ########################################################################
11 #
12 # Project-wide settings
13
14 # Where gtest's .h files can be found.
15 include_directories(
16   googletest/include
17   )
18
19 if(WIN32)
20   add_definitions(-DGTEST_OS_WINDOWS=1)
21 endif()
22
23 if (LLVM_INCLUDE_TESTS OR LLVM_BUILD_TESTS)
24   add_llvm_library(gtest
25     googletest/gtest.cc
26     googletest/gtest-death-test.cc
27     googletest/gtest-filepath.cc
28     googletest/gtest-port.cc
29     googletest/gtest-test-part.cc
30     googletest/gtest-typed-test.cc
31     )
32
33   add_llvm_library(gtest_main
34     UnitTestMain/TestMain.cpp
35     )
36 endif()