From f00f350ca3bb9a3b23b8733e44d73a1cdd8c772f Mon Sep 17 00:00:00 2001 From: Fabian Oboril Date: Tue, 20 Nov 2018 14:18:40 +0100 Subject: [PATCH] Change cmake version from 3.9 to 3.5 No feature of cmake newer than 3.5 is used. Therefore, we can use cmake 3.5, which is also standard in Ubuntu 16.04, whereas cmake 3.9 is non-standard. --- CMakeLists.txt | 2 +- Docs/how_to_build_on_linux.md | 4 ---- LibCarla/cmake/CMakeLists.txt | 2 +- LibCarla/cmake/client/CMakeLists.txt | 2 +- LibCarla/cmake/server/CMakeLists.txt | 2 +- LibCarla/cmake/test/CMakeLists.txt | 2 +- Util/BuildTools/Setup.sh | 4 ++++ 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4721d53f3..16ab9f2c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9.0) +cmake_minimum_required(VERSION 3.5.1) project(CARLA) include("Build/CMakeLists.txt.in") diff --git a/Docs/how_to_build_on_linux.md b/Docs/how_to_build_on_linux.md index 03bfea72f..661ead096 100644 --- a/Docs/how_to_build_on_linux.md +++ b/Docs/how_to_build_on_linux.md @@ -12,10 +12,6 @@ sudo apt-get install build-essential clang-5.0 lld-5.0 g++-7 ninja-build python pip install --user setuptools nose2 ``` -Note that some dependencies require **CMake 3.9** or later installed in your -machine, you can retrieve the latest version from the -[CMake download page][cmakelink]. - To avoid compatibility issues between Unreal Engine and the CARLA dependencies, the best configuration is to compile everything with the same compiler version and C++ runtime library. We use clang 5.0 and LLVM's libc++. We recommend to diff --git a/LibCarla/cmake/CMakeLists.txt b/LibCarla/cmake/CMakeLists.txt index 1549a8a44..88fc64242 100644 --- a/LibCarla/cmake/CMakeLists.txt +++ b/LibCarla/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9.0) +cmake_minimum_required(VERSION 3.5.1) project(libcarla) message(STATUS "Building ${PROJECT_NAME} version ${CARLA_VERSION}") diff --git a/LibCarla/cmake/client/CMakeLists.txt b/LibCarla/cmake/client/CMakeLists.txt index f8aed357d..eb252bf12 100644 --- a/LibCarla/cmake/client/CMakeLists.txt +++ b/LibCarla/cmake/client/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9.0) +cmake_minimum_required(VERSION 3.5.1) project(libcarla-client) # Install rpclib. diff --git a/LibCarla/cmake/server/CMakeLists.txt b/LibCarla/cmake/server/CMakeLists.txt index b09de3675..9756d73ac 100644 --- a/LibCarla/cmake/server/CMakeLists.txt +++ b/LibCarla/cmake/server/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9.0) +cmake_minimum_required(VERSION 3.5.1) project(libcarla-server) # Install libc++ shared libraries. diff --git a/LibCarla/cmake/test/CMakeLists.txt b/LibCarla/cmake/test/CMakeLists.txt index 05a03da8b..0722f6b58 100644 --- a/LibCarla/cmake/test/CMakeLists.txt +++ b/LibCarla/cmake/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9.0) +cmake_minimum_required(VERSION 3.5.1) project(libcarla-unit-tests) file(GLOB_RECURSE libcarla_test_sources diff --git a/Util/BuildTools/Setup.sh b/Util/BuildTools/Setup.sh index 74175aeac..a88a842c5 100755 --- a/Util/BuildTools/Setup.sh +++ b/Util/BuildTools/Setup.sh @@ -149,6 +149,10 @@ else log "Building rpclib with libc++." + # rpclib does not use any cmake 3.9 feature. + # As cmake 3.9 is not standard in Ubuntu 16.04, change cmake version to 3.5 + sed -i s/"3.9.0"/"3.5.0"/g ${RPCLIB_BASENAME}-source/CMakeLists.txt + mkdir -p ${RPCLIB_BASENAME}-libcxx-build pushd ${RPCLIB_BASENAME}-libcxx-build >/dev/null