Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Update to C++17 version #4366

Merged
merged 4 commits into from
Jan 9, 2025
Merged

Build: Update to C++17 version #4366

merged 4 commits into from
Jan 9, 2025

Conversation

rouault
Copy link
Member

@rouault rouault commented Jan 2, 2025

The immediate driver for this change is related when fetching GTest. Currently we are stuck with GTest-1.12.1 because is the latest version supporting C++11. Later versions require C++14.
However, GTest-1.12.1 has a CMakeLists.txt with
cmake_minimum_required(VERSION 3.5) which causes the following warning with modern CMake versions:

CMake Deprecation Warning at build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

Updating to >= C++14 allows us to use GTest-1.15.2 which has a cmake_minimum_required(VERSION 3.13)

@rouault rouault added this to the 9.6.0 milestone Jan 2, 2025
@rouault rouault added the funded through GSP Work funded through the GDAL Sponsorship Program label Jan 2, 2025
@rouault rouault force-pushed the cpp_17 branch 5 times, most recently from 396c56d to af1a5e9 Compare January 3, 2025 01:14
@rouault rouault force-pushed the cpp_17 branch 2 times, most recently from 170fe4c to 4041014 Compare January 3, 2025 02:02
The immediate driver for this change is related when fetching GTest.
Currently we are stuck with GTest-1.12.1 because is the latest version
supporting C++11. Later versions require C++14.
However, GTest-1.12.1 has a CMakeLists.txt with
``cmake_minimum_required(VERSION 3.5)`` which causes the following
warning with modern CMake versions:
```
CMake Deprecation Warning at build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.
```
Updating to >= C++14 allows us to use GTest-1.15.2 which has a
``cmake_minimum_required(VERSION 3.13)``
@rouault rouault merged commit 081d12a into OSGeo:master Jan 9, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
funded through GSP Work funded through the GDAL Sponsorship Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants