mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
CMakeLists.txt: fix build with libev and without testapps
Move libev workaround outside the if ((LWS_ROLE_H1 OR LWS_ROLE_H2) AND NOT LWS_WITHOUT_TESTAPPS) block otherwise build fails on: /home/naourr/work/instance-1/output-1/build/libwebsockets-3.2.0/lib/event-libs/libev/libev.c: In function 'lws_ev_hrtimer_cb': /home/naourr/work/instance-1/output-1/build/libwebsockets-3.2.0/lib/event-libs/libev/libev.c:34:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ev_timer_set(&pt->ev.hrtimer, ((float)us) / 1000000.0, 0); ^~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/b5a2188dce90f3ca9bf0cc7a043c1a946b8e288f AG: this doesn't really fix anything... the spew is intentionally part of libev. It just hides the spew... since the maintainer won't fix it this is the only way AFAIK. Other than don't use libev. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
parent
3e013bf352
commit
3817780ea7
1 changed files with 2 additions and 6 deletions
|
@ -1360,6 +1360,8 @@ endif()
|
|||
if (LWS_WITH_LIBEV AND LWS_WITH_NETWORK)
|
||||
list(APPEND SOURCES
|
||||
lib/event-libs/libev/libev.c)
|
||||
# libev generates a big mess of warnings with gcc, maintainer claims gcc to blame
|
||||
set_source_files_properties( lib/event-libs/libev/libev.c PROPERTIES COMPILE_FLAGS "-Wno-error" )
|
||||
endif()
|
||||
|
||||
if (LWS_WITH_LEJP)
|
||||
|
@ -2114,12 +2116,6 @@ if ((LWS_ROLE_H1 OR LWS_ROLE_H2) AND NOT LWS_WITHOUT_TESTAPPS)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if (LWS_WITH_LIBEV)
|
||||
# libev generates a big mess of warnings with gcc, maintainer claims gcc to blame
|
||||
set_source_files_properties( lib/event-libs/libev/libev.c PROPERTIES COMPILE_FLAGS "-Wno-error" )
|
||||
endif()
|
||||
|
||||
|
||||
if (NOT LWS_WITHOUT_SERVER)
|
||||
#
|
||||
# test-server
|
||||
|
|
Loading…
Add table
Reference in a new issue