cmake: compiler: gcc: Add no_strict_aliasing flag
This commit adds the `no_strict_aliasing` flag, which disables the strict aliasing rule, for the GCC compiler and its derivatives. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
parent
9672858c19
commit
1f2c1c6278
1 changed files with 3 additions and 0 deletions
|
@ -129,6 +129,9 @@ set_property(TARGET compiler-cpp PROPERTY dialect_cpp20 "-std=c++20"
|
||||||
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2b "-std=c++2b"
|
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2b "-std=c++2b"
|
||||||
"-Wno-register" "-Wno-volatile")
|
"-Wno-register" "-Wno-volatile")
|
||||||
|
|
||||||
|
# Flag for disabling strict aliasing rule in C and C++
|
||||||
|
set_compiler_property(PROPERTY no_strict_aliasing -fno-strict-aliasing)
|
||||||
|
|
||||||
# Disable exceptions flag in C++
|
# Disable exceptions flag in C++
|
||||||
set_property(TARGET compiler-cpp PROPERTY no_exceptions "-fno-exceptions")
|
set_property(TARGET compiler-cpp PROPERTY no_exceptions "-fno-exceptions")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue