diff --git a/.cproject b/.cproject
index 30d73c4b9..78cc6a563 100644
--- a/.cproject
+++ b/.cproject
@@ -1586,14 +1586,6 @@
true
true
-
- make
- -j2
- test
- true
- true
- true
-
make
-j1
@@ -1842,6 +1834,46 @@
true
true
+
+ make
+ -j2
+ inference
+ true
+ true
+ true
+
+
+ make
+ -j2
+ linear
+ true
+ true
+ true
+
+
+ make
+ -j2
+ nonlinear
+ true
+ true
+ true
+
+
+ make
+ -j2
+ slam
+ true
+ true
+ true
+
+
+ make
+ -j2
+ examples
+ true
+ true
+ true
+
make
-j2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa4cfa2f6..591f0c4bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,4 +70,4 @@ add_subdirectory(tests)
#add_subdirectory(wrap)
# Build examples
-#add_subdirectory(examples)
+add_subdirectory(examples)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 67af622cd..7589e4ba0 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,8 +1,24 @@
+#set(examples_local_libs
+# slam
+# nonlinear
+# linear
+# inference
+# geometry
+# base
+# ccolamd
+# CppUnitLite
+# ${Boost_LIBRARIES}
+#)
+
+add_custom_target(examples)
+
# Build example executables
FILE(GLOB example_srcs "*.cpp")
foreach(example_src ${example_srcs} )
get_filename_component(example_base ${example_src} NAME_WE)
set( example_bin ${example_base} )
+ message(STATUS "Adding Example ${example_bin}")
+ add_dependencies(examples ${example_bin})
add_executable(${example_bin} ${example_src})
target_link_libraries(${example_bin} gtsam-static)
endforeach(example_src)
diff --git a/examples/vSLAMexample/CMakeLists.txt b/examples/vSLAMexample/CMakeLists.txt
index ecc51fe36..57fd6bf6d 100644
--- a/examples/vSLAMexample/CMakeLists.txt
+++ b/examples/vSLAMexample/CMakeLists.txt
@@ -1,17 +1,14 @@
# Build vSLAMexample
-set ( srcs
- Feature2D.cpp
- vSLAMutils.cpp
-)
-add_library(vSLAMexample ${srcs})
-
-add_executable(vISAMexample vISAMexample.cpp)
-target_link_libraries(vISAMexample vSLAMexample gtsam-static)
-
-add_executable(vSFMexample vSFMexample.cpp)
-target_link_libraries(vSFMexample vSLAMexample gtsam-static)
+message(STATUS "Adding Example vISAMexample")
+add_executable(vISAMexample vISAMexample.cpp vSLAMutils.cpp)
+target_link_libraries(vISAMexample gtsam-static)
+add_dependencies(examples vISAMexample)
+message(STATUS "Adding Example vSFMexample")
+add_executable(vSFMexample vSFMexample.cpp vSLAMutils.cpp)
+target_link_libraries(vSFMexample gtsam-static)
+add_dependencies(examples vSFMexample)
diff --git a/examples/vSLAMexample/Feature2D.cpp b/examples/vSLAMexample/Feature2D.cpp
deleted file mode 100644
index 3a3af01a1..000000000
--- a/examples/vSLAMexample/Feature2D.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-/* ----------------------------------------------------------------------------
-
- * GTSAM Copyright 2010, Georgia Tech Research Corporation,
- * Atlanta, Georgia 30332-0415
- * All Rights Reserved
- * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
-
- * See LICENSE for the license information
-
- * -------------------------------------------------------------------------- */
-
-/**
- * @file Feature2D.cpp
- * @brief
- * @author Duy-Nguyen Ta
- */
-
-#include "Feature2D.h"
-
diff --git a/examples/vSLAMexample/Makefile.am b/examples/vSLAMexample/Makefile.am
index 6a8616cc9..625c57564 100644
--- a/examples/vSLAMexample/Makefile.am
+++ b/examples/vSLAMexample/Makefile.am
@@ -12,10 +12,10 @@ check_PROGRAMS =
# Examples
noinst_PROGRAMS = vSFMexample
-vSFMexample_SOURCES = vSFMexample.cpp Feature2D.cpp vSLAMutils.cpp
+vSFMexample_SOURCES = vSFMexample.cpp vSLAMutils.cpp
noinst_PROGRAMS += vISAMexample
-vISAMexample_SOURCES = vISAMexample.cpp Feature2D.cpp vSLAMutils.cpp
+vISAMexample_SOURCES = vISAMexample.cpp vSLAMutils.cpp
headers += Feature2D.h vSLAMutils.h
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index be4ed17dc..5aa278169 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -2,18 +2,6 @@
add_custom_target(check.tests COMMAND ${CMAKE_CTEST_COMMAND})
add_custom_target(timing.tests)
-set(tests_local_libs
- slam
- nonlinear
- linear
- inference
- geometry
- base
- ccolamd
- CppUnitLite
- ${Boost_LIBRARIES}
-)
-
# Build tests
file(GLOB tests_srcs "test*.cpp")
foreach(test_src ${tests_srcs})
@@ -24,7 +12,7 @@ foreach(test_src ${tests_srcs})
add_dependencies(check.tests ${test_bin})
add_dependencies(check ${test_bin})
add_test(${test_base} ${EXECUTABLE_OUTPUT_PATH}${test_bin})
- target_link_libraries(${test_bin} ${tests_local_libs})
+ target_link_libraries(${test_bin} gtsam-static CppUnitLite ${Boost_LIBRARIES})
add_custom_target(${test_bin}.run ${EXECUTABLE_OUTPUT_PATH}${test_bin} ${ARGN})
endforeach(test_src)
@@ -37,7 +25,7 @@ foreach(time_src ${timing_srcs})
add_executable(${time_bin} ${time_src})
add_dependencies(timing.tests ${time_bin})
add_dependencies(timing ${time_bin})
- target_link_libraries(${time_bin} ${tests_local_libs})
+ target_link_libraries(${time_bin} gtsam-static CppUnitLite ${Boost_LIBRARIES})
add_custom_target(${time_bin}.run ${EXECUTABLE_OUTPUT_PATH}${time_bin} ${ARGN})
endforeach(time_src)