diff options
author | Eric <eric@efcs.ca> | 2017-03-28 01:43:42 -0600 |
---|---|---|
committer | Dominic Hamon <dominichamon@users.noreply.github.com> | 2017-03-28 00:43:42 -0700 |
commit | 0dbcdf56a0d0ed817a7fccf8f622259ee8dafa18 (patch) | |
tree | 57753504558992e5a9af1f3fc4c17792f9691f79 /CMakeLists.txt | |
parent | ec15860da5808a0b0fa43ab74a5c4404dbcc7ac5 (diff) | |
download | google-benchmark-0dbcdf56a0d0ed817a7fccf8f622259ee8dafa18.tar.gz |
Add BENCHMARK_BUILD_32_BITS option and add builders to test it (#360)
* 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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 713d22b..1ba3133 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,8 @@ option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." ON) option(BENCHMARK_ENABLE_EXCEPTIONS "Enable the use of exceptions in the benchmark library." ON) option(BENCHMARK_ENABLE_LTO "Enable link time optimisation of the benchmark library." OFF) option(BENCHMARK_USE_LIBCXX "Build and test using libc++ as the standard library." OFF) +option(BENCHMARK_BUILD_32_BITS "Build a 32 bit version of the library" OFF) + # Make sure we can import out CMake functions list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -34,6 +36,10 @@ include(CheckCXXCompilerFlag) include(AddCXXCompilerFlag) include(CXXFeatureCheck) +if (BENCHMARK_BUILD_32_BITS) + add_required_cxx_compiler_flag(-m32) +endif() + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # Turn compiler warnings up to 11 string(REGEX REPLACE "[-/]W[1-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") |