jimbraun / XCDF

XCDF: eXplicitly Compacted Data Format. See documentation at Read the Docs:
https://xcdf.readthedocs.io/en/latest/
Other
14 stars 8 forks source link

Update CMake configuration #103

Closed HealthyPear closed 1 year ago

HealthyPear commented 1 year ago

Some people (a minority I hope) are still using ancient versions of GCC for which the C++11 standard (the minimum required here) was still supported experimentally.

We cannot support all the compilers of the last 10 years, and for the next release I propose to at least require C+11 explicitly by updating the CMake configuration with

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

We should probably start tracking (maybe in a separate issue) the progress towards an update of the code base to support more recent standards.

This is not best practice in modern CMake (>v3 that is) and policies (which exist to improve development, fix bugs and introduce new features) should not be put to OLD in favour of a more recent version and features of CMake.


I am not an expert of CMake - these are just the obvious points I see.