if (BUILD_HOST)
    set(PLATFORM "host" CACHE STRING "" FORCE)
else ()
    set_property(CACHE PLATFORM PROPERTY STRINGS
        "nrf52832_xxAA" "nrf52840_xxAA" "nrf52810_xxAA" "nrf51422_xxAC")
endif ()

if (NOT EXISTS "${CMAKE_CONFIG_DIR}/platform/${PLATFORM}.cmake")
    message(FATAL_ERROR "Platform specific file for ${PLATFORM} not found.")
endif()
