Commit efc9404e authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - now unit tests for the modules work again (linked against module lib

[CHANGE] - splitted distancemap and distancemap isosurface.
parent 27b021c3
......@@ -11,6 +11,7 @@ ADD_SUBDIRECTORY( deterministicFTMori )
ADD_SUBDIRECTORY( detTractClustering )
ADD_SUBDIRECTORY( detTractCulling )
ADD_SUBDIRECTORY( distanceMap )
ADD_SUBDIRECTORY( distanceMapIsosurface )
ADD_SUBDIRECTORY( eegView )
ADD_SUBDIRECTORY( fiberSelection )
ADD_SUBDIRECTORY( fiberTransform )
......
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
......@@ -27,7 +27,6 @@
#include <algorithm>
#include <vector>
#include "WMDistanceMap.h"
#include "WMDistanceMapIsosurface.h"
#include "distancemapIsosurface.xpm"
......@@ -105,10 +104,7 @@ void WMDistanceMapIsosurface::moduleMain()
//////////////////////////////////////////////////////////////////////////////////
// create a new instance of WMDistanceMap
// NOTE: as the distance map is a "local" module, we can't use the module factory (as WMDistanceMap is not a prototype there).
m_distanceMapModule = boost::shared_ptr< WModule >( new WMDistanceMap() );
// The initialization of the module has to be done by the ModuleFactory to ensure proper initialization.
WModuleFactory::initializeModule( m_distanceMapModule );
m_distanceMapModule = WModuleFactory::getModuleFactory()->create( WModuleFactory::getModuleFactory()->getPrototypeByName( "Distance Map" ) );
// add it to the container
add( m_distanceMapModule );
......
......@@ -2,13 +2,13 @@ FILE( GLOB_RECURSE MODULES_SRC "*.cpp" "*.h" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/modules )
GET_FILENAME_COMPONENT( modname ${CMAKE_CURRENT_SOURCE_DIR} NAME )
ADD_LIBRARY( ${modname} MODULE ${MODULES_SRC} )
ADD_LIBRARY( ${modname} SHARED ${MODULES_SRC} )
TARGET_LINK_LIBRARIES( ${modname} kernel )
INSTALL( TARGETS ${modname} LIBRARY DESTINATION bin/modules ARCHIVE DESTINATION bin/modules )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${MODULES_SRC}"
"kernel"
"kernel;${modname}"
)
ENDIF( OW_COMPILE_TESTS )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment