This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 4c7011d026bb5038a55bcdd3824707ca0eaa93e7
Author: Bowen Wang <[email protected]>
AuthorDate: Mon Mar 9 18:59:35 2026 +0800

    openamp/open-amp.cmake: select DRIVER/DEVICE support with open-amp options
    
    open-amp.cmake defines VIRTIO_DEVICE_SUPPORT/VIRTIO_DRIVER_SUPPORT with
    add_compile_definitions(), while open-amp's own CMake also defines them
    from its WITH_VIRTIO_DEVICE/WITH_VIRTIO_DRIVER options, which default to
    ON. With CONFIG_OPENAMP_VIRTIO_DEVICE_SUPPORT or _DRIVER_SUPPORT off the
    two definitions disagree. Set the open-amp options from Kconfig instead.
    
    Signed-off-by: Bowen Wang <[email protected]>
---
 openamp/open-amp.cmake | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/openamp/open-amp.cmake b/openamp/open-amp.cmake
index 61dde70a8fc..6655608a6f2 100644
--- a/openamp/open-amp.cmake
+++ b/openamp/open-amp.cmake
@@ -105,15 +105,15 @@ add_compile_definitions(elf_load=remoteproc_elf_load)
 add_compile_definitions(safe_strcpy=openamp_safe_strcpy)
 
 if(CONFIG_OPENAMP_VIRTIO_DEVICE_SUPPORT)
-  add_compile_definitions(VIRTIO_DEVICE_SUPPORT=1)
+  set(WITH_VIRTIO_DEVICE ON)
 else()
-  add_compile_definitions(VIRTIO_DEVICE_SUPPORT=0)
+  set(WITH_VIRTIO_DEVICE OFF)
 endif()
 
 if(CONFIG_OPENAMP_VIRTIO_DRIVER_SUPPORT)
-  add_compile_definitions(VIRTIO_DRIVER_SUPPORT=1)
+  set(WITH_VIRTIO_DRIVER ON)
 else()
-  add_compile_definitions(VIRTIO_DRIVER_SUPPORT=0)
+  set(WITH_VIRTIO_DRIVER OFF)
 endif()
 
 set(WITH_LIBMETAL_FIND OFF)

Reply via email to