1 ########################################################################
2 # Experimental CMake build script for Google Test.
4 # Consider this a prototype. It will change drastically. For now,
5 # this is only for people on the cutting edge.
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 ########################################################################
12 # Project-wide settings
14 # Where gtest's .h files can be found.
20 add_definitions(-DGTEST_OS_WINDOWS=1)
23 if(SUPPORTS_NO_VARIADIC_MACROS_FLAG)
24 add_definitions("-Wno-variadic-macros")
27 set(LLVM_REQUIRES_RTTI 1)
28 add_definitions( -DGTEST_HAS_RTTI=0 )
29 # libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not
30 # supported by Clang, so force googletest to use its own tuple implementation.
31 add_definitions( -DGTEST_USE_OWN_TR1_TUPLE )
33 add_llvm_library(gtest
35 googletest/gtest-death-test.cc
36 googletest/gtest-filepath.cc
37 googletest/gtest-port.cc
38 googletest/gtest-test-part.cc
39 googletest/gtest-typed-test.cc
42 add_llvm_library(gtest_main
43 UnitTestMain/TestMain.cpp