commit | 05bb85523cc743c92de2e146dbbc7ed3406e20ec | [log] [tgz] |
---|---|---|
author | Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no> | Fri Dec 10 15:06:30 2021 +0100 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Wed Dec 22 17:58:42 2021 +0100 |
tree | e556b1d9f601f55e53653276715d5bbe4f6c8f8a | |
parent | d9f0ca394320277c8dfb1e5210db6acefc391423 [diff] |
cmake: improve the check of optimization level against CMAKE_BUILD_TYPE Fixes: #39626 The CMAKE_C_FLAGS_<build_type> is a string with arguments separated by spaces and not a list, for example "-O3 -DNDEBUG". Therefore update the `if()` check to do a regex match to determine if the optimization level specified through Kconfig matches the optimization level that would be defined by the CMAKE_BUILD_TYPE setting. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>