Skip to content

Commit

Permalink
Disable tests if target dependencies are not found
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Mar 27, 2019
1 parent 41349ec commit 7f85494
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,25 @@ if(ENABLE_tests)

# testKinRepresentation

add_executable(testKinRepresentation testKinRepresentation.cpp)
if(TARGET KinematicRepresentationLib)
add_executable(testKinRepresentation testKinRepresentation.cpp)

target_link_libraries(testKinRepresentation KinematicRepresentationLib
gtest_main)
target_link_libraries(testKinRepresentation KinematicRepresentationLib
gtest_main)

gtest_add_tests(testKinRepresentation "" AUTO)
gtest_add_tests(testKinRepresentation "" AUTO)
endif()

# testScrewTheory

add_executable(testScrewTheory testScrewTheory.cpp)
if(TARGET ScrewTheoryLib)
add_executable(testScrewTheory testScrewTheory.cpp)

target_link_libraries(testScrewTheory ScrewTheoryLib
gtest_main)
target_link_libraries(testScrewTheory ScrewTheoryLib
gtest_main)

gtest_add_tests(testScrewTheory "" AUTO)
gtest_add_tests(testScrewTheory "" AUTO)
endif()

# testKdlSolver

Expand Down Expand Up @@ -57,25 +61,29 @@ if(ENABLE_tests)

# testAsibotSolverFromFile

add_executable(testAsibotSolverFromFile testAsibotSolverFromFile.cpp)
if(TARGET KinematicRepresentationLib)
add_executable(testAsibotSolverFromFile testAsibotSolverFromFile.cpp)

target_link_libraries(testAsibotSolverFromFile YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
KinematicRepresentationLib
KinematicsDynamicsInterfaces
gtest_main)
target_link_libraries(testAsibotSolverFromFile YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
KinematicRepresentationLib
KinematicsDynamicsInterfaces
gtest_main)

gtest_add_tests(testAsibotSolverFromFile "" AUTO)
gtest_add_tests(testAsibotSolverFromFile "" AUTO)
endif()

# testKdlTrajectory

add_executable(testKdlTrajectory testKdlTrajectory.cpp)
if(TARGET TrajectoryLib)
add_executable(testKdlTrajectory testKdlTrajectory.cpp)

target_link_libraries(testKdlTrajectory TrajectoryLib
gtest_main)
target_link_libraries(testKdlTrajectory TrajectoryLib
gtest_main)

gtest_add_tests(testKdlTrajectory "" AUTO)
gtest_add_tests(testKdlTrajectory "" AUTO)
endif()

# testBasicCartesianControl

Expand Down

0 comments on commit 7f85494

Please sign in to comment.