calculix-adapter
calculix-adapter copied to clipboard
Automatic adjustment of compiler flags based on compiler/version
We currently have the quick-and-dirty solution for GCC 10 or newer:
FFLAGS = -Wall -O3 -fopenmp $(INCLUDES)
# Note for GCC 10 or newer: add -fallow-argument-mismatch in the above flags
With Ubuntu 22.04 LTS, this will become a more pressing issue, as people will stumble upon it more often without reading the documentation.
We could easily make a condition in the Makefile to check if this is GCC and if it is >=10
. Not necessarily now, just documenting the need. We have more pressing issues.
Maybe there is already some fix in the vanilla CalculiX Makefile?
Can't we just enable the flag in all cases, to be safe ?
No, because older compilers will complain that they don't know the flag. Already fell into this trap before. :see_no_evil: