fab
fab copied to clipboard
Properly handle compiler versions
Atm compiler versions are only handled as strings. We need to properly convert them to integer-tuples to allow comparison, and also support compiler-specific compiler flags to be added
This is the current way of how LFRic makefiles do compiler version comparison. I have converted this into Python:
compiler_version_comparison = ''.join(f"{int(version_component):02d}" for version_component in compiler.get_version().split('.'))
if compiler_version_comparison >= '190000':
runtime_flags = ...
else: ...
So current get_version() returns a string 1.20.0. It is converted to string 012000 and then compared with string 190000
Has been fixed quite some time ago.