Compare commits
1 Commits
i150
...
e942a7d157
| Author | SHA1 | Date | |
|---|---|---|---|
| e942a7d157 |
@@ -134,11 +134,17 @@ endif()
|
||||
# ========================================================
|
||||
# Test executables
|
||||
# ========================================================
|
||||
if(GTest_FOUND OR GTEST_FOUND)
|
||||
# Tests are a development-machine concern: a catkin workspace is where they run,
|
||||
# while the standalone CMake build is the robot deployment path and must not
|
||||
# produce test executables. Force with -DBUILD_NAV_GRID_TESTS=ON to build them
|
||||
# from a standalone build.
|
||||
option(BUILD_NAV_GRID_TESTS "Build the nav_grid unit tests" ${BUILDING_WITH_CATKIN})
|
||||
|
||||
if(BUILD_NAV_GRID_TESTS AND (GTest_FOUND OR GTEST_FOUND))
|
||||
enable_testing()
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/utest.cpp)
|
||||
if(BUILD_NAV_GRID_TESTS AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/utest.cpp)
|
||||
add_executable(${PROJECT_NAME}_test test/utest.cpp)
|
||||
target_link_libraries(${PROJECT_NAME}_test PRIVATE
|
||||
${PROJECT_NAME}
|
||||
|
||||
Reference in New Issue
Block a user