Skip to content

Commit

Permalink
Merge pull request ethz-asl#12 from ethz-asl/feature/initial_empty_st…
Browse files Browse the repository at this point in the history
…ructure

Added initial empty files and cmake lists
  • Loading branch information
simonlynen committed Aug 18, 2014
2 parents 2b91be2 + 5b1a83f commit 3bdf581
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 0 deletions.
38 changes: 38 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
cmake_minimum_required(VERSION 2.8.3)
project(eigen_checks)

find_package(catkin_simple REQUIRED)
catkin_simple()

add_definitions(--std=c++0x -Wall -Wextra -pedantic)

cs_add_library(${PROJECT_NAME} src/eigen_checks.cc)

catkin_add_gtest(test_gtest_near
test/test_gtest_near.cc)
target_link_libraries(test_gtest_near ${PROJECT_NAME})

catkin_add_gtest(test_gtest_equal
test/test_gtest_equal.cc)
target_link_libraries(test_gtest_equal ${PROJECT_NAME})

catkin_add_gtest(test_gtest_equal_double
test/test_gtest_equal_double.cc)
target_link_libraries(test_gtest_equal_double ${PROJECT_NAME})

catkin_add_gtest(test_glog_near
test/test_glog_near.cc)
target_link_libraries(test_glog_near ${PROJECT_NAME})

catkin_add_gtest(test_glog_equal
test/test_glog_equal.cc)
target_link_libraries(test_glog_equal ${PROJECT_NAME})

catkin_add_gtest(test_glog_equal_double
test/test_glog_equal_double.cc)
target_link_libraries(test_glog_equal_double ${PROJECT_NAME})

cs_install()

cs_export(INCLUDE_DIRS include
CFG_EXTRAS eigen_checks-extras.cmake)
6 changes: 6 additions & 0 deletions cmake/eigen_checks-extras.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if (CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter")
29 changes: 29 additions & 0 deletions include/eigen-checks/entrypoint.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifndef EIGEN_CHECKS_ENTRYPOINT_H_
#define EIGEN_CHECKS_ENTRYPOINT_H_

#include <gtest/gtest.h>
#include <glog/logging.h>

// Let the Eclipse parser see the macro.
#ifndef TEST
#define TEST(a, b) int Test_##a##_##b()
#endif

#ifndef TEST_F
#define TEST_F(a, b) int Test_##a##_##b()
#endif

#ifndef TEST_P
#define TEST_P(a, b) int Test_##a##_##b()
#endif

#define UNITTEST_ENTRYPOINT \
int main(int argc, char** argv) { \
google::InitGoogleLogging(argv[0]); \
testing::InitGoogleTest(&argc, argv); \
google::ParseCommandLineFlags(&argc, &argv, true); \
::testing::FLAGS_gtest_death_test_style = "threadsafe"; \
return RUN_ALL_TESTS();\
}

#endif // EIGEN_CHECKS_ENTRYPOINT_H_
20 changes: 20 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<package>
<name>eigen_checks</name>
<version>0.0.1</version>
<description>Glog and Gtest check, assert, expect macros for eigen types.</description>
<maintainer email="[email protected]">Simon Lynen</maintainer>

<license>ASL 2.0</license>

<url type="website">https://github.com/ethz-asl/eigen_checks</url>
<url type="bugtracker">https://github.com/ethz-asl/eigen_checks/issues</url>

<author>Simon Lynen</author>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>catkin_simple</buildtool_depend>

<build_depend>eigen_catkin</build_depend>
<build_depend>gflags_catkin</build_depend>
<build_depend>glog_catkin</build_depend>
</package>
Empty file added src/eigen_checks.cc
Empty file.
5 changes: 5 additions & 0 deletions test/test_glog_equal.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <eigen-checks/entrypoint.h>



UNITTEST_ENTRYPOINT
5 changes: 5 additions & 0 deletions test/test_glog_equal_double.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <eigen-checks/entrypoint.h>



UNITTEST_ENTRYPOINT
5 changes: 5 additions & 0 deletions test/test_glog_near.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <eigen-checks/entrypoint.h>



UNITTEST_ENTRYPOINT
5 changes: 5 additions & 0 deletions test/test_gtest_equal.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <eigen-checks/entrypoint.h>



UNITTEST_ENTRYPOINT
5 changes: 5 additions & 0 deletions test/test_gtest_equal_double.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <eigen-checks/entrypoint.h>



UNITTEST_ENTRYPOINT
5 changes: 5 additions & 0 deletions test/test_gtest_near.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <eigen-checks/entrypoint.h>



UNITTEST_ENTRYPOINT

0 comments on commit 3bdf581

Please sign in to comment.