commit | cff94bf7a01289ff1fe90ee89efad1690cb3ceea | [log] [tgz] |
---|---|---|
author | Stephanos Ioannidis <root@stephanos.io> | Tue Nov 12 21:50:39 2019 +0900 |
committer | Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no> | Mon Dec 09 16:17:12 2019 +0100 |
tree | 26968d809c878ca89d8c98a05c76dfdf28e1b874 | |
parent | b30b480c7c6b2056bd376b327be9c3d7bfda3688 [diff] |
cmake: Add GCC -Og flag fallback to -O0. The -Og (optimise for debugging) flag is only available for GCC 4.8.0 and above, and specifying it for a GCC version lower than 4.8.0 will result in a compilation error. This commit adds a check for compiler -Og optimisation flag support and a fallback to -O0 (disable optimisation) when -Og flag is unsupported. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>