chore(build): check for no-invalid-offsetof before applying

This commit is contained in:
fallenoak 2020-12-02 22:56:09 -06:00
parent a5b2cc0391
commit 7a0699ae8f
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D

View file

@ -1,3 +1,6 @@
include(CheckCCompilerFlag)
check_c_compiler_flag(-Wno-invalid-offsetof HAS_NO_INVALID_OFFSETOF)
file(GLOB STORM_SOURCES file(GLOB STORM_SOURCES
"*.cpp" "*.cpp"
"hash/*.cpp" "hash/*.cpp"
@ -37,7 +40,9 @@ target_link_libraries(storm
system system
) )
if(HAS_NO_INVALID_OFFSETOF)
target_compile_options(storm target_compile_options(storm
PUBLIC PUBLIC
-Wno-invalid-offsetof -Wno-invalid-offsetof
) )
endif()