Переглянути джерело
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
5 роки тому
Не вдалося знайти GPG ключ що відповідає даному підпису
Ідентифікатор GPG ключа: C3EAC3DE9321D59B
1 змінених файлів з
1 додано та
0 видалено
CMakeLists.txt
@ -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 )
# s r c / e x t e r n a l / j a r _ x m . h d o e s s h a d y s t u f f
add_if_flag_compiles ( -fno-strict-aliasing CMAKE_C_FLAGS )