mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 12:13:33 +08:00
Path cleanup, low impact changes (#5340)
* Low impact changes from path_cleanup branch. This is a step towards minimizing the diff with path_cleanup branch. * Update ecl. * Revert matrix update. * Revert ecl and matrix. * Update sitl gazebo. * Revert sitl_gazebo and matrix changes.
This commit is contained in:
@@ -13,15 +13,19 @@ enable_testing()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -std=gnu99 -g")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=gnu++0x -g -fno-exceptions -fno-rtti -fno-threadsafe-statics -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__")
|
||||
|
||||
if (NOT PX4_SOURCE_DIR)
|
||||
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
endif()
|
||||
|
||||
set(GTEST_DIR ${CMAKE_SOURCE_DIR}/googletest)
|
||||
|
||||
set(GTEST_DIR ${PX4_SOURCE_DIR}/unittests/googletest)
|
||||
add_subdirectory(${GTEST_DIR})
|
||||
include_directories(${GTEST_DIR}/include)
|
||||
|
||||
set(PX4_SRC ${CMAKE_SOURCE_DIR}/../src)
|
||||
set(PX4_SRC ${PX4_SOURCE_DIR}/src)
|
||||
set(PX4_SITL_BUILD ${PX4_SRC}/../build_posix_sitl_default)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
include_directories(${PX4_SOURCE_DIR})
|
||||
include_directories(${PX4_SITL_BUILD}/src)
|
||||
include_directories(${PX4_SITL_BUILD}/src/modules)
|
||||
include_directories(${PX4_SITL_BUILD}/src/modules/param)
|
||||
@@ -69,7 +73,7 @@ set(PX4_PLATFORM
|
||||
# check
|
||||
add_custom_target(check
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} -j2 --output-on-failure
|
||||
WORKING_DIR ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIR ${PX4_BINARY_DIR}
|
||||
USES_TERMINAL)
|
||||
|
||||
# add_gtest
|
||||
@@ -80,7 +84,7 @@ function(add_gtest)
|
||||
else()
|
||||
target_link_libraries(${test_name} gtest_main pthread rt ${PX4_PLATFORM})
|
||||
endif()
|
||||
add_test(NAME ${test_name} COMMAND ${test_name} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
add_test(NAME ${test_name} COMMAND ${test_name} WORKING_DIRECTORY ${PX4_SOURCE_DIR})
|
||||
add_dependencies(check ${test_name})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user