Skip to content
Snippets Groups Projects
Commit 0d52a735 authored by Thomas Moulard's avatar Thomas Moulard
Browse files

Simplify CMakeLists.txt in unitTesting and add copyright header.

parent b2a7e14e
No related branches found
No related tags found
No related merge requests found
#
# 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment