Skip to content

Commit

Permalink
Added initial empty files and cmake lists
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlynen committed Aug 18, 2014
1 parent 2b91be2 commit ec32064
Show file tree
Hide file tree
Showing 11 changed files with 140 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")
46 changes: 46 additions & 0 deletions include/eigen-checks/entrypoint.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (C) 2014 Simon Lynen, ASL, ETH Zurich, Switzerland
* You can contact the author at <slynen at ethz dot ch>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#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 ec32064

Please sign in to comment.