Procházet zdrojové kódy

CMake: make unsequenced modifications an error

They not only result in discrepancies between different compiler,
but trigger undefined behavior. Avoid them by having them break
the CMake build and CI.
pull/832/head
Ahmad Fatoum před 5 roky
rodič
revize
23c1c0bdb2
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: C3EAC3DE9321D59B
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. +1
    -0
      CMakeLists.txt

+ 1
- 0
CMakeLists.txt Zobrazit soubor

@ -19,6 +19,7 @@ endif()
include(AddIfFlagCompiles)
add_if_flag_compiles(-Werror=pointer-arith CMAKE_C_FLAGS)
add_if_flag_compiles(-Werror=implicit-function-declaration CMAKE_C_FLAGS)
add_if_flag_compiles(-Werror=unsequenced CMAKE_C_FLAGS)
# src/external/jar_xm.h does shady stuff
add_if_flag_compiles(-fno-strict-aliasing CMAKE_C_FLAGS)

Načítá se…
Zrušit
Uložit