aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2017-06-13Revert "Use NEW settings for CMP0063 policy (#399)" (#401)Eric
This reverts commit af542061c53f9c1746c5c1c84493c903978988a7.
2017-06-13Use NEW settings for CMP0063 policy (#399)Tim
This removes warnings when using CMake >= 3.3 if you have symbol visibility set.
2017-05-03test commitEric Fiselier
2017-03-28Add BENCHMARK_BUILD_32_BITS option and add builders to test it (#360)Eric
* Add BENCHMARK_BUILD_32_BITS option and add builders to test it * Attempt to fix travis configuration * Make add_required_cxx_compiler_flag cause an error when the flag isn't supported * add gcc-multilib dependancy on travis * attempt to fix travis.yml parsing error * Require g++-multilib instead of gcc-multilib * Add 32 bit release configurations * Attempt to fix libc++ travis build w/ 32 bits * Work around CMake configuration failure on Travis
2017-03-27Fix ICC compiler warnings (#358)rolandschulz
fixes #354 The build fails with ICC17 because of warnings and Werror. What is the correct solution to fix it? Should a patch disable Werror for ICC (or maybe all non known compilers) disable the false postive warnings for all files. This could be done using: add_cxx_compiler_flag(-wd2102) #ICC17u2: Many false positives for Wstrict-aliasing add_cxx_compiler_flag(-wd2259) #ICC17u2: non-pointer conversion from "long" to "int" may lose significant bits (even for explicit static cast, sleep.cc(44)) add_cxx_compiler_flag(-wd654) #ICC17u2: overloaded virtual function "benchmark::Fixture::SetUp" is only partially overridden (because of deprecated overload) disable warnings at file level or some other granularity
2016-12-05Add support for building w/o exceptions (#317)Eric
2016-12-05Update the required CMake version to 2.8.12 (#316)Eric
2016-10-08Fix #294. Add -D_GNU_SOURCE when building under CygwinEric Fiselier
2016-09-05Refactor benchmark.cc into benchmark_register.cc and benchmark.cc (#287)Eric
* Refactor benchmark.cc into benchmark_register.cc and benchmark_run.cc The benchmark.cc file is getting really big and it contains a bunch of unrelated components. This patch separates the files into two separate parts. The "runtime" parts and the "registration" parts. This patch also removes the PIMPL used by Benchmark. Previously we couldn't have STL types in the interface but now we can. Therefore there is no reason to keep BenchmarkImp. * add missing include * rework windows timers again * Guard timespec on older Windows versions * Remove old thread safety annotation workarounds
2016-09-02Make `PauseTiming()` and `ResumeTiming()` per thread. (#286)Eric
* Change to using per-thread timers * fix bad assertions * fix copy paste error on windows * Fix thread safety annotations * Make null-log thread safe * remove remaining globals * use chrono for walltime since it is thread safe * consolidate timer functions * Add missing ctime include * Rename to be consistent with Google style * Format patch using clang-format * cleanup -Wthread-safety configuration * Don't trust _POSIX_FEATURE macros because OS X lies. * Fix OS X thread timings * attempt to fix mingw build * Attempt to make mingw work again * Revert old mingw workaround * improve diagnostics * Drastically improve OS X measurements * Use average real time instead of max
2016-08-29Add -DBENCHMARK_USE_LIBCXX:BOOL=<value> option. (#280)Eric
* Add BENCHMARK_USE_LIBCXX option. * Add comments * re-add zero null pointer warning
2016-07-06Add export linker flags policy to cmake (#251)Steve Downey
Add policy CMP0056, which honors the link flags in try_compile and try_run. This allows for building against non-system libc++ by providing the correct -L and rpath options in a containing project. For example: set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L ${LLVM_ROOT}/lib -l c++ -l c++abi") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,${LLVM_ROOT}/lib")
2016-05-10Added GCC/Clang support for other rel configsBilly Robert O'Neal III
2016-05-10Added support for CMake's other rel configsBilly Robert O'Neal III
In addition to release, CMake supports RELWITHDEBINFO and MINSIZEREL build configurations. In particular, debug info is necessary for many profilers to do anything useful, making RELWITHDEBINFO important here. MINSIZEREL was added for completeness' sake.
2016-05-10Fix clobbering of default CMAKE_CXX_FLAGS_RELEASEBilly Robert O'Neal III
BENCHMARK_ENABLE_LTO=true was completely replacing CMAKE_CXX_FLAGS_RELEASE; meaning neither CMake's release defaults nor user customizations were being applied.
2016-05-10Remove redundant MSVC++ /W3 triggering warningsBilly Robert O'Neal III
This change looks for CMake's default setting for MSVC++, /W3 (and any other level should that change in the future), and removes it before adding /W4. This stops the build for MSVC++ emitting warnings about /W4 overriding /W3 earlier on the command line.
2016-02-12Support MSVC on appveyorArkadiy Shapkin
2015-10-08Revert "Added Wconversion so the gcc/clang warnings will be more similar to ↵Anton Danielsson
W4 on MSVC." This reverts commit 0a2bd8935391e42f2581ec4826f7ac5f8fc9041a.
2015-10-08Added Wconversion so the gcc/clang warnings will be more similar to W4 on MSVC.Anton Danielsson
This also points out some important issues like: warning: conversion to 'size_t {aka unsigned int}' from 'long long int' may alter its value [-Wconversion] state.SetBytesProcessed(items_processed * sizeof(v)); This occurs on 32 bit systems where size_t is only 32 bits.
2015-10-08Added _CRT_SECURE_NO_WARNINGS under MSVC.Anton Danielsson
2015-10-08Changed MSVC warnings from Wall to W4 to avoid 10000+ warnings from ↵Anton Danielsson
stl/windows headers.
2015-05-13Enable strict aliasing warningsMatt Clarkson
2015-05-13Coverage support with LCOV and GCOVMatt Clarkson
This patch adds a `coverage` target that allows coverage statisitics to be retrieved for the project. It requires that lcov and gcov is installed and that the generator is unix makefiles but this can be improved upon in future releases. To make it work use the coverage build type: ``` cmake -DCMAKE_BUILD_TYPE=Coverage . make coverage ```
2015-05-12Allow the user to set the C++ standard to useMatt Clarkson
This is useful to test the library at different standard levels. Currently doesn't search for C++14 in 'auto' mode. Can enable in the future
2015-05-12Group common C++ flagsMatt Clarkson
2015-05-12Compile with link time optimisationMatt Clarkson
Can provide speed improvements
2015-05-05Only warn on errors in release modeMatt Clarkson
This improves development iterations when working in debug mode as you don't have to fix up warnings to get the code to compile. Once a feature is complete you can then run a release build and fix up all the warnings.
2015-04-03Rearrange the piecesDominic Hamon
2015-04-03Drop down to CMake 2.8.11, and drop INTERFACE since that version doesn'tGeoff Romer
support it.
2015-04-03Require cmake 2.8.12 in order to support target_include_directories, andGeoff Romer
simplify thread linking logic.
2015-04-01Remove BENCHMARK_ENABLE_SHARED and prefer BUILD_SHARED_LIBSEric Fiselier
2015-03-26finish selection of clock with debug informationEric Fiselier
2015-03-17merge masterEric Fiselier
2015-03-17Merge null pointer warningsEric Fiselier
2015-03-12add floating point comparison warningsEric Fiselier
2015-03-12Enable int shortening warningsEric Fiselier
2015-03-12Enable zero as NULL warnings and fix all occurencesEric Fiselier
2015-03-12Adopt new benchmark timing internals.Eric Fiselier
This patch adopts a new internal structure for how timings are performed. Currently every iteration of a benchmark checks to see if it has been running for an appropriate amount of time. Checking the clock introduces noise into the timings and this can cause inconsistent output from each benchmark. Now every iteration of a benchmark only checks an iteration count to see if it should stop running. The iteration count is determined before hand by testing the benchmark on a series of increasing iteration counts until a suitable count is found. This increases the amount of time it takes to run the actual benchmarks but it also greatly increases the accuracy of the results. This patch introduces some breaking changes. The notable breaking changes are: 1. Benchmarks run on multiple threads no generate a report per thread. Instead only a single report is generated. 2. ::benchmark::UseRealTime() was removed and replaced with State::UseRealTime().
2015-03-06Step one towards merging timer changes.Eric Fiselier
This patch cleans up our use of generic macros and also merges changes in the build system. It adds options -DBENCHMARK_ENABLE_TESTING and -DBENCHMARK_ENABLE_SHARED.
2015-02-21Fix #77 add FreeBSD detection in cmakePavel Davydov
2015-02-19Don't use c++14Eric Fiselier
2014-10-26remove -Wzero-as-null-pointer-constant flag for nowNiklas Hofmann
2014-10-18Merge pull request #58 from google/zero_nullChris Kennelly
Fix #50 by using nullptr and adding stricter warning.
2014-10-11Fix #50 by using nullptr and adding stricter warning.Dominic Hamon
2014-10-11Move pthread dependency to test CMakeLists.txtDominic Hamon
2014-08-22Resolve regular expression enginesMatt Clarkson
2014-08-20CMakeLists.txt commentsMatt Clarkson
2014-08-20Consistent indentation in CMakeLists.txtMatt Clarkson
2014-08-08Verify gtest with URL_MD5Matt Clarkson
2014-08-07Remove URL_HASH as it is unsupportedDominic Hamon