diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index cb4ba63fe..4923287c5 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -286,7 +286,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA) if(ENABLE_FPGA) set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") if(DEFINED ENV{OECORE_TARGET_SYSROOT}) - set(CROSS_INSTALL_DIR "${CROSS_INSTALL_DIR} -DBOOST_ROOT=$ENV{OECORE_TARGET_SYSROOT}/usr -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON") + set(CROSS_INSTALL_DIR "${CROSS_INSTALL_DIR} -DBOOST_ROOT=$ENV{OECORE_TARGET_SYSROOT}/usr") endif() else() set(CROSS_INSTALL_DIR "") @@ -307,12 +307,15 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA) if(CMAKE_GENERATOR STREQUAL Xcode) set(GNSS_SIM_BUILD_COMMAND "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}" "-target" "gnss_sim") endif() + if(TOOLCHAIN_ARG) + set(TOOLCHAIN_ARG_GNSS_SIM "${TOOLCHAIN_ARG} -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON") + endif() ExternalProject_Add(gnss-sim GIT_REPOSITORY https://bitbucket.org/jarribas/gnss-simulator GIT_TAG ${GNSSSDR_GNSS_SIM_LOCAL_VERSION} SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/gnss-sim BINARY_DIR ${CMAKE_BINARY_DIR}/gnss-sim - CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} ${CROSS_INSTALL_DIR} + CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG_GNSS_SIM} ${CROSS_INSTALL_DIR} BUILD_COMMAND ${GNSS_SIM_BUILD_COMMAND} UPDATE_COMMAND "" PATCH_COMMAND ""