Skip to content
Snippets Groups Projects
Verified Commit 0e867ef7 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Build system: enforce minimal GCC version

parent 331d58cc
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,18 @@ cpp_compiler = meson.get_compiler('cpp') ...@@ -17,6 +17,18 @@ cpp_compiler = meson.get_compiler('cpp')
fortran_compiler = meson.get_compiler('fortran') fortran_compiler = meson.get_compiler('fortran')
c_compiler = meson.get_compiler('c') c_compiler = meson.get_compiler('c')
# If this is GCC, enforce minimal version
# Other compilers are unsupported, but do not fail in that case
gcc_minimal_version = 10
if ((cpp_compiler.get_id() == 'gcc'
and cpp_compiler.version().version_compare('<' + gcc_minimal_version.to_string()))
or (fortran_compiler.get_id() == 'gcc'
and fortran_compiler.version().version_compare('<' + gcc_minimal_version.to_string()))
or (c_compiler.get_id() == 'gcc'
and c_compiler.version().version_compare('<' + gcc_minimal_version.to_string())))
error('GCC is too old. Version ' + gcc_minimal_version.to_string() + ' or higher is required.')
endif
### Preprocessor ### Preprocessor
subdir('preprocessor/src') subdir('preprocessor/src')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment