diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-12-02 17:21:13 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-12-08 12:08:59 -0800 |
commit | c1465e606e01a5d11f87c32ab6adc171ff3cb619 (patch) | |
tree | 4e954705da1d5aa0079a4133f576c3ef48548810 /host/tests/CMakeLists.txt | |
parent | 8fd2aa80ab7609cc16e5922149c8ec453153c7c8 (diff) | |
download | uhd-c1465e606e01a5d11f87c32ab6adc171ff3cb619.tar.gz uhd-c1465e606e01a5d11f87c32ab6adc171ff3cb619.tar.bz2 uhd-c1465e606e01a5d11f87c32ab6adc171ff3cb619.zip |
cmake: tests: Conditionally compile tests for X400
When using ENABLE_X400=OFF, we should also disable the corresponding
tests, or we get linker errors.
Diffstat (limited to 'host/tests/CMakeLists.txt')
-rw-r--r-- | host/tests/CMakeLists.txt | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt index a049c7e2e..d8e26890a 100644 --- a/host/tests/CMakeLists.txt +++ b/host/tests/CMakeLists.txt @@ -365,30 +365,38 @@ UHD_ADD_RFNOC_BLOCK_TEST( TARGET window_block_test.cpp ) -UHD_ADD_RFNOC_BLOCK_TEST( - TARGET x4xx_radio_block_test.cpp - EXTRA_SOURCES - ${UHD_SOURCE_DIR}/lib/usrp/common/lmx2572.cpp - ${UHD_SOURCE_DIR}/lib/usrp/common/pwr_cal_mgr.cpp - ${UHD_SOURCE_DIR}/lib/usrp/x400/x400_gpio_control.cpp - ${UHD_SOURCE_DIR}/lib/usrp/x400/x400_radio_control.cpp - ${UHD_SOURCE_DIR}/lib/usrp/x400/x400_rfdc_control.cpp - ${UHD_SOURCE_DIR}/lib/usrp/x400/adc_self_calibration.cpp - ${UHD_SOURCE_DIR}/lib/rfnoc/radio_control_impl.cpp - ${UHD_SOURCE_DIR}/lib/rfnoc/rf_control/gain_profile.cpp - ${UHD_SOURCE_DIR}/lib/usrp/mpmd/mpmd_mb_controller.cpp - ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_dboard.cpp - ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_dboard_init.cpp - ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_lo_ctrl.cpp - ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_cpld_ctrl.cpp - ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_expert.cpp - ${UHD_SOURCE_DIR}/lib/utils/compat_check.cpp - ${UHD_SOURCE_DIR}/lib/features/discoverable_feature_registry.cpp - ${UHD_SOURCE_DIR}/lib/usrp/cores/gpio_atr_3000.cpp - $<TARGET_OBJECTS:uhd_rpclib> - INCLUDE_DIRS ${UHD_SOURCE_DIR}/lib/deps/rpclib/include - INCLUDE_DIRS ${UHD_SOURCE_DIR}/lib/deps/flatbuffers/include -) +IF(ENABLE_X400) + UHD_ADD_RFNOC_BLOCK_TEST( + TARGET x4xx_radio_block_test.cpp + EXTRA_SOURCES + ${UHD_SOURCE_DIR}/lib/usrp/common/lmx2572.cpp + ${UHD_SOURCE_DIR}/lib/usrp/common/pwr_cal_mgr.cpp + ${UHD_SOURCE_DIR}/lib/usrp/x400/x400_gpio_control.cpp + ${UHD_SOURCE_DIR}/lib/usrp/x400/x400_radio_control.cpp + ${UHD_SOURCE_DIR}/lib/usrp/x400/x400_rfdc_control.cpp + ${UHD_SOURCE_DIR}/lib/usrp/x400/adc_self_calibration.cpp + ${UHD_SOURCE_DIR}/lib/rfnoc/radio_control_impl.cpp + ${UHD_SOURCE_DIR}/lib/rfnoc/rf_control/gain_profile.cpp + ${UHD_SOURCE_DIR}/lib/usrp/mpmd/mpmd_mb_controller.cpp + ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_dboard.cpp + ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_dboard_init.cpp + ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_lo_ctrl.cpp + ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_cpld_ctrl.cpp + ${UHD_SOURCE_DIR}/lib/usrp/dboard/zbx/zbx_expert.cpp + ${UHD_SOURCE_DIR}/lib/utils/compat_check.cpp + ${UHD_SOURCE_DIR}/lib/features/discoverable_feature_registry.cpp + ${UHD_SOURCE_DIR}/lib/usrp/cores/gpio_atr_3000.cpp + $<TARGET_OBJECTS:uhd_rpclib> + INCLUDE_DIRS ${UHD_SOURCE_DIR}/lib/deps/rpclib/include + INCLUDE_DIRS ${UHD_SOURCE_DIR}/lib/deps/flatbuffers/include + ) + + UHD_ADD_NONAPI_TEST( + TARGET "x400_rfdc_control_test.cpp" + EXTRA_SOURCES + ${UHD_SOURCE_DIR}/lib/usrp/x400/x400_rfdc_control.cpp + ) +ENDIF(ENABLE_X400) UHD_ADD_NONAPI_TEST( TARGET "mb_controller_test.cpp" @@ -432,12 +440,6 @@ UHD_ADD_NONAPI_TEST( ${UHD_SOURCE_DIR}/lib/rfnoc/rf_control/gain_profile.cpp ) -UHD_ADD_NONAPI_TEST( - TARGET "x400_rfdc_control_test.cpp" - EXTRA_SOURCES - ${UHD_SOURCE_DIR}/lib/usrp/x400/x400_rfdc_control.cpp -) - ######################################################################## # demo of a loadable module ######################################################################## |