Commit graph

12 commits

Author SHA1 Message Date
Olzhas Kaiyrakhmet d731697a5d Fix SOURCE_DIR in HandleGTest.cmake (#705)
If benchmark added as cmake subproject, HandleGTest throws an error as  does return absolute source dir.
Change it to , so it will be refering to it's own source dir.

Also see PR #703.
2018-10-13 01:06:41 -07:00
Eric 8356d646bf
Revert "Fix SOURCE_DIR in HandleGTest.cmake (#703)" (#704)
This reverts commit 609752306f.
2018-10-13 00:53:25 -07:00
Olzhas Kaiyrakhmet 609752306f Fix SOURCE_DIR in HandleGTest.cmake (#703)
* Fix SOURCE_DIR in HandleGTest.cmake

If benchmark added as cmake subproject, HandleGTest throws an error as  does return absolute source dir.
Change it to , so it will be refering to it's own source dir.
2018-10-13 00:51:51 -07:00
Gregorio Litenstein 9ffb8df6c5 Fix Clang Detection (#697)
For several versions now, CMake by default refers to macOS’ Clang as AppleClang instead of just Clang, which would fail STREQUAL. Fixed by changing it to MATCHES.
2018-10-05 16:44:02 +01:00
Deniz Evrenci 6d74c0625b split_list is not defined for assembly tests (#595)
* Update AUTHORS and CONTRIBUTORS

* split_list is not defined for assembly tests
2018-05-14 15:02:49 +01:00
Roman Lebedev e8ddd907bb There is no "FATAL" in message(), only "FATAL_ERROR" (#584) 2018-05-08 11:33:37 +01:00
Eric Fiselier 2844167ff9 Fix #564 - gmock/gmock.h not found in benchmark tests. 2018-04-05 18:34:13 -06:00
Eric Fiselier 68e228944e Fix #538 - gtest.h not found when building with older CMake versions.
Older CMake versions, in particular 2.8, don't seem to correctly handle
interface include directories. This causes failures when building the
tests. Additionally, older CMake versions use a different library install
directory than expected (i.e. they use lib/<target-triple>). This caused
certain tests to fail to link.

This patch fixes both those issues. The first by manually adding the
correct include directory when building the tests. The second by specifying
the library output directory when configuring the GTest build.
2018-03-21 13:27:04 -06:00
Eric Fiselier 562f9d256d Fix GTest workaround on MSVC 2018-02-12 18:43:32 -07:00
Eric 906749a48e Work around Gtest build failure caused by -Werror=unused-function. (#529)
We're propagating extra warning flags to the gtest build, which
can cause it to fail. This patch prevents passing "-Wextra" to
gtest, since the library itself doesn't test with that flag.
2018-02-12 17:11:01 -08:00
Eric Fiselier 778b85a7a9 Prevent GTest and GMock from being installed with Google Benchmark.
When users satisfy the GTest dependancy by placing a googletest
directory in the project, the targets from GTest and GMock incorrectly
get installed along side this library. We shouldn't be installing
our test dependancies.

This patch forces the options that control installation for googletest
to OFF.
2018-01-05 11:04:22 -07:00
Eric 7db02be244
Add support for GTest based unit tests. (#485)
* Add support for GTest based unit tests.

As Dominic and I have previously discussed, there is some
need/desire to improve the testing situation in Google Benchmark.

One step to fixing this problem is to make it easier to write
unit tests by adding support for GTest, which is what this patch does.

By default it looks for an installed version of GTest. However the
user can specify -DBENCHMARK_BUILD_EXTERNAL_GTEST=ON to instead
download, build, and use copy of gtest from source. This is
quite useful when Benchmark is being built in non-standard configurations,
such as against libc++ or in 32 bit mode.
2017-12-13 16:26:47 -07:00