Michael J. Spencer | 10d274d | 2010-09-24 09:01:13 +0000 | [diff] [blame] | 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 | |
Michael J. Spencer | 33a390e | 2010-10-07 18:12:54 +0000 | [diff] [blame] | 23 | if(SUPPORTS_NO_VARIADIC_MACROS_FLAG) |
| 24 | add_definitions("-Wno-variadic-macros") |
| 25 | endif() |
| 26 | |
Oscar Fuentes | 889c1e7 | 2010-10-17 02:26:16 +0000 | [diff] [blame] | 27 | set(LLVM_REQUIRES_RTTI 1) |
| 28 | add_definitions( -DGTEST_HAS_RTTI=0 ) |
Oscar Fuentes | 889c1e7 | 2010-10-17 02:26:16 +0000 | [diff] [blame] | 29 | |
Oscar Fuentes | 46d8a93 | 2010-09-25 20:25:25 +0000 | [diff] [blame] | 30 | add_llvm_library(gtest |
| 31 | googletest/gtest.cc |
| 32 | googletest/gtest-death-test.cc |
| 33 | googletest/gtest-filepath.cc |
| 34 | googletest/gtest-port.cc |
| 35 | googletest/gtest-test-part.cc |
| 36 | googletest/gtest-typed-test.cc |
| 37 | ) |
Michael J. Spencer | 10d274d | 2010-09-24 09:01:13 +0000 | [diff] [blame] | 38 | |
Oscar Fuentes | 46d8a93 | 2010-09-25 20:25:25 +0000 | [diff] [blame] | 39 | add_llvm_library(gtest_main |
| 40 | UnitTestMain/TestMain.cpp |
| 41 | ) |