Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check to see if testing is enabled to prevent build failures #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 34 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,45 +33,49 @@ add_definitions(--std=c++0x -Wall -Wextra -pedantic)
cs_add_library(${PROJECT_NAME} src/eigen-checks.cc)

find_package (Threads)
catkin_add_gtest(test_gtest_near
test/test_gtest-near.cc)
target_link_libraries(test_gtest_near ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_gtest_equal
test/test_gtest-equal.cc)
target_link_libraries(test_gtest_equal ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
# if testing is enabled
if (CATKIN_ENABLE_TESTING)
catkin_add_gtest(test_gtest_near
test/test_gtest-near.cc)
target_link_libraries(test_gtest_near ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_gtest_zero
test/test_gtest-zero.cc)
target_link_libraries(test_gtest_zero ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
catkin_add_gtest(test_gtest_equal
test/test_gtest-equal.cc)
target_link_libraries(test_gtest_equal ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_gtest_equal_double
test/test_gtest-equal-double.cc)
target_link_libraries(test_gtest_equal_double ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
catkin_add_gtest(test_gtest_zero
test/test_gtest-zero.cc)
target_link_libraries(test_gtest_zero ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_glog_near
test/test_glog-near.cc)
target_link_libraries(test_glog_near ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
catkin_add_gtest(test_gtest_equal_double
test/test_gtest-equal-double.cc)
target_link_libraries(test_gtest_equal_double ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_glog_equal
test/test_glog-equal.cc)
target_link_libraries(test_glog_equal ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
catkin_add_gtest(test_glog_near
test/test_glog-near.cc)
target_link_libraries(test_glog_near ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_glog_zero
test/test_glog-zero.cc)
target_link_libraries(test_glog_zero ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
catkin_add_gtest(test_glog_equal
test/test_glog-equal.cc)
target_link_libraries(test_glog_equal ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_glog_equal_double
test/test_glog-equal-double.cc)
target_link_libraries(test_glog_equal_double ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
catkin_add_gtest(test_glog_zero
test/test_glog-zero.cc)
target_link_libraries(test_glog_zero ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_glog-zero-sized-types
test/test_glog-zero-sized-types.cc)
target_link_libraries(test_glog-zero-sized-types ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
catkin_add_gtest(test_glog_equal_double
test/test_glog-equal-double.cc)
target_link_libraries(test_glog_equal_double ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_gtest-zero-sized-types
test/test_gtest-zero-sized-types.cc)
target_link_libraries(test_gtest-zero-sized-types ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
catkin_add_gtest(test_glog-zero-sized-types
test/test_glog-zero-sized-types.cc)
target_link_libraries(test_glog-zero-sized-types ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

catkin_add_gtest(test_gtest-zero-sized-types
test/test_gtest-zero-sized-types.cc)
target_link_libraries(test_gtest-zero-sized-types ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
endif()

cs_install()

Expand Down