Skip to content

Commit f00f350

Browse files
committed
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.
1 parent cddb982 commit f00f350

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9.0)
1+
cmake_minimum_required(VERSION 3.5.1)
22
project(CARLA)
33

44
include("Build/CMakeLists.txt.in")

Docs/how_to_build_on_linux.md

-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ sudo apt-get install build-essential clang-5.0 lld-5.0 g++-7 ninja-build python
1212
pip install --user setuptools nose2
1313
```
1414

15-
Note that some dependencies require **CMake 3.9** or later installed in your
16-
machine, you can retrieve the latest version from the
17-
[CMake download page][cmakelink].
18-
1915
To avoid compatibility issues between Unreal Engine and the CARLA dependencies,
2016
the best configuration is to compile everything with the same compiler version
2117
and C++ runtime library. We use clang 5.0 and LLVM's libc++. We recommend to

LibCarla/cmake/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9.0)
1+
cmake_minimum_required(VERSION 3.5.1)
22
project(libcarla)
33

44
message(STATUS "Building ${PROJECT_NAME} version ${CARLA_VERSION}")

LibCarla/cmake/client/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9.0)
1+
cmake_minimum_required(VERSION 3.5.1)
22
project(libcarla-client)
33

44
# Install rpclib.

LibCarla/cmake/server/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9.0)
1+
cmake_minimum_required(VERSION 3.5.1)
22
project(libcarla-server)
33

44
# Install libc++ shared libraries.

LibCarla/cmake/test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9.0)
1+
cmake_minimum_required(VERSION 3.5.1)
22
project(libcarla-unit-tests)
33

44
file(GLOB_RECURSE libcarla_test_sources

Util/BuildTools/Setup.sh

+4
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ else
149149

150150
log "Building rpclib with libc++."
151151

152+
# rpclib does not use any cmake 3.9 feature.
153+
# As cmake 3.9 is not standard in Ubuntu 16.04, change cmake version to 3.5
154+
sed -i s/"3.9.0"/"3.5.0"/g ${RPCLIB_BASENAME}-source/CMakeLists.txt
155+
152156
mkdir -p ${RPCLIB_BASENAME}-libcxx-build
153157

154158
pushd ${RPCLIB_BASENAME}-libcxx-build >/dev/null

0 commit comments

Comments
 (0)