aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/CMakeLists.txt94
-rw-r--r--host/lib/transport/nirio/CMakeLists.txt8
-rw-r--r--host/lib/transport/nirio/lvbitx/CMakeLists.txt32
3 files changed, 67 insertions, 67 deletions
diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt
index 7c79bc67c..a7f986277 100644
--- a/host/lib/transport/CMakeLists.txt
+++ b/host/lib/transport/CMakeLists.txt
@@ -12,17 +12,17 @@
########################################################################
# Include subdirectories (different than add)
########################################################################
-IF(ENABLE_X300)
+if(ENABLE_X300)
INCLUDE_SUBDIRECTORY(nirio)
-ENDIF(ENABLE_X300)
+endif(ENABLE_X300)
########################################################################
# Setup libusb
########################################################################
-IF(ENABLE_USB)
- MESSAGE(STATUS "")
- MESSAGE(STATUS "USB support enabled via libusb.")
- INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS})
+if(ENABLE_USB)
+ message(STATUS "")
+ message(STATUS "USB support enabled via libusb.")
+ include_directories(${LIBUSB_INCLUDE_DIRS})
LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES})
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/libusb1_control.cpp
@@ -30,23 +30,23 @@ IF(ENABLE_USB)
${CMAKE_CURRENT_SOURCE_DIR}/libusb1_base.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libusb1_base.hpp
)
- SET_SOURCE_FILES_PROPERTIES(
+ set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/libusb1_zero_copy.cpp
PROPERTIES COMPILE_DEFINITIONS "${LIBUSB_DEFINITIONS}"
)
-ELSE(ENABLE_USB)
+else(ENABLE_USB)
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/usb_dummy_impl.cpp
)
-ENDIF(ENABLE_USB)
+endif(ENABLE_USB)
########################################################################
# Setup defines for interface address discovery
########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Configuring interface address discovery...")
-INCLUDE(CheckCXXSourceCompiles)
-INCLUDE(CheckIncludeFileCXX)
+message(STATUS "")
+message(STATUS "Configuring interface address discovery...")
+include(CheckCXXSourceCompiles)
+include(CheckIncludeFileCXX)
CHECK_CXX_SOURCE_COMPILES("
#include <ifaddrs.h>
@@ -60,18 +60,18 @@ CHECK_CXX_SOURCE_COMPILES("
CHECK_INCLUDE_FILE_CXX(winsock2.h HAVE_WINSOCK2_H)
-IF(HAVE_GETIFADDRS)
- MESSAGE(STATUS " Interface address discovery supported through getifaddrs.")
- SET(IF_ADDRS_DEFS HAVE_GETIFADDRS)
-ELSEIF(HAVE_WINSOCK2_H)
- MESSAGE(STATUS " Interface address discovery supported through SIO_GET_INTERFACE_LIST.")
- SET(IF_ADDRS_DEFS HAVE_SIO_GET_INTERFACE_LIST)
-ELSE()
- MESSAGE(STATUS " Interface address discovery not supported.")
- SET(IF_ADDRS_DEFS HAVE_IF_ADDRS_DUMMY)
-ENDIF()
-
-SET_SOURCE_FILES_PROPERTIES(
+if(HAVE_GETIFADDRS)
+ message(STATUS " Interface address discovery supported through getifaddrs.")
+ set(IF_ADDRS_DEFS HAVE_GETIFADDRS)
+elseif(HAVE_WINSOCK2_H)
+ message(STATUS " Interface address discovery supported through SIO_GET_INTERFACE_LIST.")
+ set(IF_ADDRS_DEFS HAVE_SIO_GET_INTERFACE_LIST)
+else()
+ message(STATUS " Interface address discovery not supported.")
+ set(IF_ADDRS_DEFS HAVE_IF_ADDRS_DUMMY)
+endif()
+
+set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/if_addrs.cpp
PROPERTIES COMPILE_DEFINITIONS "${IF_ADDRS_DEFS}"
)
@@ -79,29 +79,29 @@ SET_SOURCE_FILES_PROPERTIES(
########################################################################
# Setup UDP
########################################################################
-IF(WIN32)
+if(WIN32)
LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/udp_wsa_zero_copy.cpp)
-ELSE()
+else()
LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy.cpp)
-ENDIF()
+endif()
#On windows, the boost asio implementation uses the winsock2 library.
#Note: we exclude the .lib extension for cygwin and mingw platforms.
-IF(WIN32)
+if(WIN32)
LIBUHD_APPEND_LIBS(ws2_32)
-ENDIF()
+endif()
#atlbase.h is not included with visual studio express
#conditionally check for atlbase.h and define if found
-INCLUDE(CheckIncludeFileCXX)
+include(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX(atlbase.h HAVE_ATLBASE_H)
-IF(HAVE_ATLBASE_H)
- SET_SOURCE_FILES_PROPERTIES(
+if(HAVE_ATLBASE_H)
+ set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy.cpp
${CMAKE_CURRENT_SOURCE_DIR}/udp_wsa_zero_copy.cpp
PROPERTIES COMPILE_DEFINITIONS "HAVE_ATLBASE_H"
)
-ENDIF(HAVE_ATLBASE_H)
+endif(HAVE_ATLBASE_H)
########################################################################
# Append to the list of sources for lib uhd
@@ -123,29 +123,29 @@ LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/zero_copy_flow_ctrl.cpp
)
-IF(ENABLE_X300)
+if(ENABLE_X300)
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/nirio_zero_copy.cpp
)
-ENDIF(ENABLE_X300)
+endif(ENABLE_X300)
-IF(ENABLE_LIBERIO)
- INCLUDE_DIRECTORIES(${LIBERIO_INCLUDE_DIRS})
+if(ENABLE_LIBERIO)
+ include_directories(${LIBERIO_INCLUDE_DIRS})
LIBUHD_APPEND_LIBS(${LIBERIO_LIBRARIES})
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/liberio_zero_copy.cpp
)
-ENDIF(ENABLE_LIBERIO)
+endif(ENABLE_LIBERIO)
-IF(ENABLE_DPDK)
+if(ENABLE_DPDK)
INCLUDE_SUBDIRECTORY(uhd-dpdk)
-ENDIF(ENABLE_DPDK)
+endif(ENABLE_DPDK)
# Verbose Debug output for send/recv
-SET( UHD_TXRX_DEBUG_PRINTS OFF CACHE BOOL "Use verbose debug output for send/recv" )
-OPTION( UHD_TXRX_DEBUG_PRINTS "Use verbose debug output for send/recv" "" )
-IF(UHD_TXRX_DEBUG_PRINTS)
- MESSAGE(STATUS "Using verbose debug output for send/recv")
- ADD_DEFINITIONS(-DUHD_TXRX_DEBUG_PRINTS)
-ENDIF()
+set( UHD_TXRX_DEBUG_PRINTS OFF CACHE BOOL "Use verbose debug output for send/recv" )
+option( UHD_TXRX_DEBUG_PRINTS "Use verbose debug output for send/recv" "" )
+if(UHD_TXRX_DEBUG_PRINTS)
+ message(STATUS "Using verbose debug output for send/recv")
+ add_definitions(-DUHD_TXRX_DEBUG_PRINTS)
+endif()
diff --git a/host/lib/transport/nirio/CMakeLists.txt b/host/lib/transport/nirio/CMakeLists.txt
index 8336d6063..af456c595 100644
--- a/host/lib/transport/nirio/CMakeLists.txt
+++ b/host/lib/transport/nirio/CMakeLists.txt
@@ -29,10 +29,10 @@ LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/status.cpp
)
-IF(WIN32)
+if(WIN32)
LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_win.cpp)
-ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") #Built-in variable encompasses all UNIX-like systems
+elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") #Built-in variable encompasses all UNIX-like systems
LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_linux.cpp)
-ELSE()
+else()
LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_SOURCE_DIR}/nirio_driver_iface_unsupported.cpp)
-ENDIF(WIN32)
+endif(WIN32)
diff --git a/host/lib/transport/nirio/lvbitx/CMakeLists.txt b/host/lib/transport/nirio/lvbitx/CMakeLists.txt
index 6fbd6b469..8fb5bd079 100644
--- a/host/lib/transport/nirio/lvbitx/CMakeLists.txt
+++ b/host/lib/transport/nirio/lvbitx/CMakeLists.txt
@@ -5,21 +5,21 @@
# SPDX-License-Identifier: GPL-3.0
#
-MACRO(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM lvbitx binfile)
- GET_FILENAME_COMPONENT(lvbitxprefix ${lvbitx} NAME_WE)
+macro(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM lvbitx binfile)
+ get_filename_component(lvbitxprefix ${lvbitx} NAME_WE)
- IF( ${binfile} STREQUAL "OFF" )
- SET( GEN_OPTIONS )
- MESSAGE( STATUS " Using ${lvbitx} for codegen" )
- ELSE( ${binfile} STREQUAL "OFF" )
- SET( GEN_OPTIONS --merge-bin=${CMAKE_SOURCE_DIR}/../binaries/${binfile} --output-lvbitx-path=${CMAKE_SOURCE_DIR}/../binaries )
- MESSAGE( STATUS " Merging ${lvbitx} with ${binfile} for codegen" )
- ENDIF( ${binfile} STREQUAL "OFF" )
+ if( ${binfile} STREQUAL "OFF" )
+ set( GEN_OPTIONS )
+ message( STATUS " Using ${lvbitx} for codegen" )
+ else( ${binfile} STREQUAL "OFF" )
+ set( GEN_OPTIONS --merge-bin=${CMAKE_SOURCE_DIR}/../binaries/${binfile} --output-lvbitx-path=${CMAKE_SOURCE_DIR}/../binaries )
+ message( STATUS " Merging ${lvbitx} with ${binfile} for codegen" )
+ endif( ${binfile} STREQUAL "OFF" )
- SET(OUTPUT_PATH_OPT --output-src-path=${CMAKE_CURRENT_BINARY_DIR})
- SET(IMAGES_PATH_OPT --uhd-images-path=${UHD_IMAGES_DIR})
+ set(OUTPUT_PATH_OPT --output-src-path=${CMAKE_CURRENT_BINARY_DIR})
+ set(IMAGES_PATH_OPT --uhd-images-path=${UHD_IMAGES_DIR})
- ADD_CUSTOM_COMMAND(
+ add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.cpp
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.hpp
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/process-lvbitx.py
@@ -33,16 +33,16 @@ MACRO(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM lvbitx binfile)
#make libuhd depend on the output file
LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.hpp)
LIBUHD_APPEND_SOURCES(${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.cpp)
-ENDMACRO(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM)
+endmacro(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
########################################################################
# Generation code
########################################################################
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Processing NI-RIO FPGA LVBITX Bitstreams...")
+message(STATUS "")
+message(STATUS "Processing NI-RIO FPGA LVBITX Bitstreams...")
# X300 Stuff
LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM(x300.lvbitx_base OFF)