diff --git a/unitTesting/CMakeLists.txt b/unitTesting/CMakeLists.txt index 89f3feaa57380364e0cbd7099f10c1bce0424c4f..991bd686b152dd01c9244c2b9fa79ec939578f44 100644 --- a/unitTesting/CMakeLists.txt +++ b/unitTesting/CMakeLists.txt @@ -1,6 +1,17 @@ -# -# Copyright -# +# Copyright 2010, Olivier Stasse, JRL, CNRS/AIST +# +# This file is part of dynamic-graph. +# dynamic-graph is free software: you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# dynamic-graph is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Lesser Public License for more details. You should have +# received a copy of the GNU Lesser General Public License along with +# dynamic-graph. If not, see <http://www.gnu.org/licenses/>. ### tests SET(tests_exe @@ -17,12 +28,8 @@ SET(test_signalcast_additional_libs ${test_libs}) ADD_DEFINITIONS(-DDEBUG=2) -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR}/../include -) +LINK_DIRECTORIES(../src) -LINK_DIRECTORIES(${${PROJECT_NAME}_BINARY_DIR}/lib) - # Additional tests FOREACH(test_name ${tests_libs}) SET(LIBRARY_NAME ${test_name}) @@ -30,7 +37,7 @@ FOREACH(test_name ${tests_libs}) ADD_LIBRARY(${LIBRARY_NAME} SHARED ${test_name}.cpp) - + TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${PROJECT_NAME}) ENDFOREACH(test_name) @@ -40,12 +47,12 @@ FOREACH(test_name ${tests_exe}) ADD_EXECUTABLE(${EXECUTABLE_NAME} ${test_name}.cpp) - + TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} ${PROJECT_NAME}) - - TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} + + TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} ${${test_name}_additional_libs}) - + ADD_TEST(NAME ${test_name} COMMAND ${test_name}) ENDFOREACH(test_name)