Skip to content

Commit 3d9800d

Browse files
Mirror OAN_HOST_BACKENDS option at OAN root for standalone builds
The host-backend define was only injected by the parent OALS CMakeLists. That meant standalone OAN builds (e.g. CI on this repo) would compile with OAN_HOST_BACKENDS undefined regardless of the -D flag — and then NetworkMapper.cpp's #else branch would reference firmware externs (_now_ms, _now_us, _fetch_iface_meta), failing to link. Mirror OALS's option block here: opt-in OFF by default, forced ON on APPLE (no other transport works), translated to a compile definition.
1 parent dbfd5b4 commit 3d9800d

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,18 @@ if(NO_THREADS)
77
add_compile_definitions(NO_THREADS)
88
endif (NO_THREADS)
99

10+
# OAN_HOST_BACKENDS: switches in the host-side transport seam (SimTransport,
11+
# RawLinuxTransport, RawMacTransport). The define is normally injected by
12+
# the parent OALS build; mirror the logic here so OAN is self-buildable
13+
# (e.g. for CI of OAN-only changes). Forced ON on macOS — there is no
14+
# other working transport on Apple at the moment.
15+
option(OAN_HOST_BACKENDS "Build host dev transports + RT shim" OFF)
16+
if(APPLE)
17+
set(OAN_HOST_BACKENDS ON CACHE BOOL "Build host dev transports + RT shim" FORCE)
18+
endif()
19+
if(OAN_HOST_BACKENDS)
20+
add_compile_definitions(OAN_HOST_BACKENDS)
21+
endif()
22+
1023
add_subdirectory(common)
1124
add_subdirectory(netutils)

0 commit comments

Comments
 (0)