diff --git a/.travis.yml b/.travis.yml index 4625dfb087..c790605803 100644 --- a/.travis.yml +++ b/.travis.yml @@ -178,7 +178,7 @@ install: fi - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo apt-get update -qq; - sudo apt-get install -qq unzip; + sudo apt-get install -qq unzip cmake3; wget https://github.com/bazelbuild/bazel/releases/download/0.10.1/bazel-0.10.1-installer-linux-x86_64.sh --output-document bazel-installer.sh; travis_wait sudo bash bazel-installer.sh; fi @@ -188,6 +188,7 @@ install: fi script: + - cmake --version - cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="${EXTRA_FLAGS}" -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON -DBENCHMARK_BUILD_32_BITS=${BUILD_32_BITS} ${EXTRA_OPTIONS} .. - make - ctest -C ${BUILD_TYPE} --output-on-failure diff --git a/CMakeLists.txt b/CMakeLists.txt index 310c7ee9f6..bb0f63d24a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.4.3) project (benchmark) diff --git a/README.md b/README.md index 38203958f1..580277a463 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,9 @@ First make sure you have git and cmake installed (If not please install them) sudo apt-get install git cmake ``` +_See [dependencies.md](dependencies.md) for more details about the supported +versions of build tools._ + Now, let's clone the repository and build it ``` diff --git a/dependencies.md b/dependencies.md new file mode 100644 index 0000000000..bd59aeb166 --- /dev/null +++ b/dependencies.md @@ -0,0 +1,23 @@ +# Build tool dependency policy + +To ensure the broadest compatibility when building the benchmark library, but +still allow forward progress, we require any build tooling to be available for: + +* Debian stable AND +* The last two Ubuntu LTS releases + +Currently, this means the highest build tool versions we can use must be +available for Ubuntu 16.04 (Xenial), Ubuntu 18.04 (Bionic), and Debian stretch. + +However, there are projects that rely on Benchmark that require a slightly older +version than this +([LLVM](https://github.com/llvm-mirror/llvm/blob/master/CMakeLists.txt)], so we +will choose something that allows this compatibility requirement to be met. + +_Note, [travis](.travis.yml) runs under Ubuntu 14.04 (Trusty) for linux builds._ + +## cmake +The current supported version is cmake 3.4.3 as of 2018-11-14. + +_Note, this version is also available for Ubuntu 14.04, the previous Ubuntu LTS +release, as `cmake3`._