From 8f8719d33b321cec96c07710ff8c58e3109470c0 Mon Sep 17 00:00:00 2001 From: FengShun Date: Mon, 27 Dec 2021 13:31:37 +0800 Subject: [PATCH] cmake: use add_definitions instead of add_compile_definitions Using make tests in docker will fail, because the current basic image used by px4io/px4-dev-simulation-bionic is ubuntu18.04, the default version of cmake is 3.10, and the add_compile_definitions command is only available in cmake 3.12+(ubuntu 20.04). --- src/modules/ekf2/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/test/CMakeLists.txt b/src/modules/ekf2/test/CMakeLists.txt index 2ade2e7509..c060d269d6 100644 --- a/src/modules/ekf2/test/CMakeLists.txt +++ b/src/modules/ekf2/test/CMakeLists.txt @@ -30,7 +30,7 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -add_compile_definitions(TEST_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}") +add_definitions(-DTEST_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) add_subdirectory(sensor_simulator)