...
 
Commits (11)
......@@ -76,7 +76,7 @@ IF( CMAKE_HOST_SYSTEM MATCHES "Linux" )
ENDIF()
TARGET_LINK_LIBRARIES( ${LibName} ${Boost_LIBRARIES} ${CMAKE_STANDARD_LIBRARIES} ${CMAKE_DL_LIBS}
${OPENGL_gl_LIBRARY}
${OPENGL_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES}
${INTERPRETER_LINK_LIBRARIES}
${ADDITIONAL_TARGET_LINK_LIBRARIES}
......
......@@ -83,13 +83,6 @@ public:
WBoundingBoxImpl( const vec_type& min, const vec_type& max );
/**
* Copy construct using a given bounding box
*
* \param bb the source bb
*/
WBoundingBoxImpl( const WBoundingBoxImpl& bb );
/**
* Create BoundinmgBox using a given sphere.
*
* \param bs the sphere
......@@ -221,12 +214,6 @@ inline WBoundingBoxImpl< VT >::WBoundingBoxImpl( const osg::BoundingSphereImpl<
}
template< class VT >
inline WBoundingBoxImpl< VT >::WBoundingBoxImpl( const WBoundingBoxImpl< VT >& bb )
: osg::BoundingBoxImpl< VT >( bb )
{
}
template< class VT >
inline WBoundingBoxImpl< VT >::~WBoundingBoxImpl()
{
}
......
......@@ -246,7 +246,7 @@ namespace wlog
* \param rhs The instance which SHOULD be copied over
* \return A reference to the variable for which assignment was INTENDED.
*/
WStreamedLogger& operator=( const WStreamedLogger& rhs );
WStreamedLogger& operator=( const WStreamedLogger& rhs ) = delete;
boost::shared_ptr< Buffer > m_buffer; //!< Collects the message parts.
};
......
......@@ -70,13 +70,6 @@ public:
explicit WInterval( const StoreType& c );
/**
* Copy constructor.
*
* \param c the interval to copy
*/
WInterval( const Type& c ); // NOLINT
/**
* Create a new interval instance using the given values.
*
* \param l the lower border
......@@ -242,13 +235,6 @@ WInterval< T >::WInterval( const StoreType& c )
}
template < typename T >
WInterval< T >::WInterval( const Type& c ):
m_interval( c.m_interval )
{
// nothing else to do
}
template < typename T >
WInterval< T >::WInterval( const T& l, const T& u ):
m_interval( std::min( l, u ), std::max( l, u ) )
{
......
......@@ -163,12 +163,12 @@ public:
}
}
TS_ASSERT_THROWS( matrix.at( 0, 4 ), WOutOfBounds );
TS_ASSERT_THROWS( matrix.at( 1, 5 ), WOutOfBounds );
TS_ASSERT_THROWS( matrix.at( 1, 4 ), WOutOfBounds );
TS_ASSERT_THROWS( matrix.at( 1, 100000 ), WOutOfBounds );
TS_ASSERT_THROWS( matrix.at( 3, 1 ), WOutOfBounds );
TS_ASSERT_THROWS( matrix.at( -1, 0 ), WOutOfBounds );
TS_ASSERT_THROWS( matrix.at( 0, 4 ), const WOutOfBounds& );
TS_ASSERT_THROWS( matrix.at( 1, 5 ), const WOutOfBounds& );
TS_ASSERT_THROWS( matrix.at( 1, 4 ), const WOutOfBounds& );
TS_ASSERT_THROWS( matrix.at( 1, 100000 ), const WOutOfBounds& );
TS_ASSERT_THROWS( matrix.at( 3, 1 ), const WOutOfBounds& );
TS_ASSERT_THROWS( matrix.at( -1, 0 ), const WOutOfBounds& );
}
/**
......
......@@ -33,7 +33,6 @@
#ifdef CXXTEST_RUNNING
namespace CxxTest
{
CXXTEST_TEMPLATE_INSTANTIATION
/**
* Enables better UnitTest OutPut if something fails with a mixin vector, so
* you see immedeatly what is failing.
......
......@@ -98,7 +98,7 @@ public:
// add a malformed (name) property
// The name is malformed since the "/" is used as group separator
TS_ASSERT_THROWS( p->addProperty( "4/5", "test4", 1.0 ), WPropertyNameMalformed );
TS_ASSERT_THROWS( p->addProperty( "4/5", "test4", 1.0 ), const WPropertyNameMalformed& );
// this should have created 3 props
TS_ASSERT( p->m_properties.getReadTicket()->get().size() == 3 );
......@@ -109,7 +109,7 @@ public:
TS_ASSERT( p3->getType() == PV_DOUBLE );
// try to add another property with the same name ( regardless of actual type )
TS_ASSERT_THROWS( p->addProperty( "1", "test1", 1.0 ), WPropertyNotUnique );
TS_ASSERT_THROWS( p->addProperty( "1", "test1", 1.0 ), const WPropertyNotUnique& );
}
/**
......@@ -249,7 +249,7 @@ public:
TS_ASSERT( someProp );
// this one does not exist
TS_ASSERT_THROWS( someProp = p->getProperty( "shouldNotBeInTheList" ), WPropertyUnknown );
TS_ASSERT_THROWS( someProp = p->getProperty( "shouldNotBeInTheList" ), const WPropertyUnknown& );
}
/**
......@@ -267,7 +267,7 @@ public:
boost::shared_ptr< WPropertyBase > p4 = psub->addProperty( "4", "test4", std::string( "hello" ) );
// insert a prop with the same name as a sub property
TS_ASSERT_THROWS( p->addProperty( "heySub", "test1", true ), WPropertyNotUnique );
TS_ASSERT_THROWS( p->addProperty( "heySub", "test1", true ), const WPropertyNotUnique& );
/////////////
// exists
......@@ -301,7 +301,7 @@ public:
TS_ASSERT_THROWS_NOTHING( p->getProperty( "heySub/4" ) );
// ensure nothing is found if wrong name is specified
TS_ASSERT_THROWS( p->getProperty( "heySub/1" ), WPropertyUnknown );
TS_ASSERT_THROWS( p->getProperty( "heySub/1" ), const WPropertyUnknown& );
}
/**
......
......@@ -94,7 +94,7 @@ public:
boost::shared_ptr< WPropertyVariable< bool > > p;
TS_ASSERT_THROWS( p = boost::shared_ptr< WPropertyVariable< bool > >( new WPropertyVariable< bool >( "hey/you", "you", false ) ),
WPropertyNameMalformed );
const WPropertyNameMalformed& );
}
/**
......
......@@ -57,11 +57,11 @@ public:
TS_ASSERT_THROWS( parseFromFile(
boost::filesystem::path( W_FIXTURE_PATH + "WStructuredTextParser_test_invalid.txt" )
), WParseError );
), const WParseError& );
TS_ASSERT_THROWS( parseFromFile(
boost::filesystem::path( W_FIXTURE_PATH + "WStructuredTextParser_test_doesnotexist.txt" )
), WFileNotFound );
), const WFileNotFound& );
// NOTE: we do not test parseFromString as both use the same backend functionality
}
......@@ -170,11 +170,11 @@ public:
TS_ASSERT( t.getValues< std::string >( "level0/notexists" ).size() == 0 );
// check operator[] (it uses getValue internally. So we only check for the WNotFound exception)
TS_ASSERT_THROWS( t.operator[]< std::string >( "level0/notexists" ), WNotFound );
TS_ASSERT_THROWS( t.operator[]< std::string >( "level0/notexists" ), const WNotFound& );
// check type conversion
// this is valid for getValue, getValues and [] as they utilize the same function
TS_ASSERT_THROWS( t.operator[]< size_t >( "level0/notuniquekv" ), WTypeMismatch );
TS_ASSERT_THROWS( t.operator[]< size_t >( "level0/notuniquekv" ), const WTypeMismatch& );
TS_ASSERT( t.operator[]< size_t >( "level0/level1/somekv" ) == 123 );
// to ensure case sensitivity:
......
......@@ -202,7 +202,7 @@ public:
void testNoFunction()
{
boost::shared_ptr< FuncType > func;
TS_ASSERT_THROWS( WWorkerThread< FuncType > w( func, 0, 1 ), WException );
TS_ASSERT_THROWS( WWorkerThread< FuncType > w( func, 0, 1 ), const WException& );
}
/**
......@@ -211,7 +211,7 @@ public:
void testThreadId()
{
boost::shared_ptr< FuncType > func( new FuncType( 5 ) );
TS_ASSERT_THROWS( WWorkerThread< FuncType > w( func, 1, 0 ), WException );
TS_ASSERT_THROWS( WWorkerThread< FuncType > w( func, 1, 0 ), const WException& );
}
// restore WASSERT_AS_CASSERT flag
#ifdef WASSERT_FLAG_CHANGED
......
......@@ -64,23 +64,23 @@ public:
TimesVector t;
// test what happens when the input is empty
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens when the vector sizes don't match
createData( data, 3, d, t );
TS_ASSERT_THROWS_NOTHING( WDataSetTimeSeries( d, t ) );
t.push_back( 4.0f );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens when there is an invalid time value
t.resize( 3 );
TS_ASSERT_THROWS_NOTHING( WDataSetTimeSeries( d, t ) );
t[ 2 ] = -0.0 / 0.0;
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens when there are equal time values
t[ 2 ] = t[ 1 ];
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens if the grids don't match
t[ 2 ] = 2.0;
......@@ -100,7 +100,7 @@ public:
boost::shared_ptr< WValueSet< double > > vs( new WValueSet< double >( 0, 1, v, W_DT_DOUBLE ) );
d.push_back( boost::shared_ptr< WDataSetScalar const >( new WDataSetScalar( vs, g ) ) );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens if the valuesets data types don't match
d.resize( 3 );
......@@ -111,7 +111,7 @@ public:
boost::shared_ptr< std::vector< float > > v2( new std::vector< float >( 27, 4 ) );
boost::shared_ptr< WValueSet< float > > vs2( new WValueSet< float >( 0, 1, v2, W_DT_FLOAT ) );
d.push_back( boost::shared_ptr< WDataSetScalar const >( new WDataSetScalar( vs2, d.front()->getGrid() ) ) );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
}
// test with 2 time slices
......@@ -121,23 +121,23 @@ public:
TimesVector t;
// test what happens when the input is empty
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens when the vector sizes don't match
createData( data, 2, d, t );
TS_ASSERT_THROWS_NOTHING( WDataSetTimeSeries( d, t ) );
t.push_back( 4.0f );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens when there is an invalid time value
t.resize( 2 );
TS_ASSERT_THROWS_NOTHING( WDataSetTimeSeries( d, t ) );
t[ 1 ] = 0.0f / 0.0f;
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens when there are equal time values
t[ 1 ] = t[ 0 ];
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens if the grids don't match
t[ 1 ] = 2.0;
......@@ -157,7 +157,7 @@ public:
boost::shared_ptr< WValueSet< double > > vs( new WValueSet< double >( 0, 1, v, W_DT_DOUBLE ) );
d.push_back( boost::shared_ptr< WDataSetScalar const >( new WDataSetScalar( vs, g ) ) );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens if the valuesets data types don't match
d.resize( 2 );
......@@ -168,7 +168,7 @@ public:
boost::shared_ptr< std::vector< float > > v2( new std::vector< float >( 27, 4 ) );
boost::shared_ptr< WValueSet< float > > vs2( new WValueSet< float >( 0, 1, v2, W_DT_FLOAT ) );
d.push_back( boost::shared_ptr< WDataSetScalar const >( new WDataSetScalar( vs2, d.front()->getGrid() ) ) );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
}
// test with 1 time slice
......@@ -178,19 +178,19 @@ public:
TimesVector t;
// test what happens when the input is empty
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens when the vector sizes don't match
createData( data, 1, d, t );
TS_ASSERT_THROWS_NOTHING( WDataSetTimeSeries( d, t ) );
t.push_back( 4.0f );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
// test what happens when there is an invalid time value
t.resize( 1 );
TS_ASSERT_THROWS_NOTHING( WDataSetTimeSeries( d, t ) );
t[ 0 ] = -0.0f / 0.0f;
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), WException );
TS_ASSERT_THROWS( WDataSetTimeSeries( d, t ), const WException& );
}
// datasets should be sorted by time
......@@ -325,7 +325,7 @@ public:
TS_ASSERT_EQUALS( 2.0f, f );
f = ts.findNearestTimeSlice( std::numeric_limits< float >::infinity() );
TS_ASSERT_EQUALS( 2.0f, f );
TS_ASSERT_THROWS( ts.findNearestTimeSlice( 0.0 / 0.0 ), WException );
TS_ASSERT_THROWS( ts.findNearestTimeSlice( 0.0 / 0.0 ), const WException& );
}
/**
......@@ -444,15 +444,15 @@ public:
// test invalid times
WVector3d pos( 1.0, 0.5, 1.0 );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, -inf, &success ), WException );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, -inf, &success ), const WException& );
TS_ASSERT( !success );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, -3.0f, &success ), WException );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, -3.0f, &success ), const WException& );
TS_ASSERT( !success );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, -wlimits::FLT_EPS, &success ), WException );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, -wlimits::FLT_EPS, &success ), const WException& );
TS_ASSERT( !success );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, 2.0f + 2.0f * wlimits::FLT_EPS, &success ), WException );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, 2.0f + 2.0f * wlimits::FLT_EPS, &success ), const WException& );
TS_ASSERT( !success );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, inf, &success ), WException );
TS_ASSERT_THROWS( h = ts.interpolate< double >( pos, inf, &success ), const WException& );
TS_ASSERT( !success );
// test invalid position
......
......@@ -66,9 +66,9 @@ public:
}
{
TS_ASSERT_THROWS_NOTHING( WGridTransformOrtho v( 2.2, 3.3, -1.0 ) );
TS_ASSERT_THROWS( WGridTransformOrtho v( 0.0, 0.0, 1.0 ), WPreconditionNotMet );
TS_ASSERT_THROWS( WGridTransformOrtho v( 0.0, 2.0, 1.0 ), WPreconditionNotMet );
TS_ASSERT_THROWS( WGridTransformOrtho v( 1.0, 1.0, 0.0 ), WPreconditionNotMet );
TS_ASSERT_THROWS( WGridTransformOrtho v( 0.0, 0.0, 1.0 ), const WPreconditionNotMet& );
TS_ASSERT_THROWS( WGridTransformOrtho v( 0.0, 2.0, 1.0 ), const WPreconditionNotMet& );
TS_ASSERT_THROWS( WGridTransformOrtho v( 1.0, 1.0, 0.0 ), const WPreconditionNotMet& );
}
{
WGridTransformOrtho v( 2.2, 3.3, -1.0 );
......@@ -90,7 +90,7 @@ public:
mat( 1, 1 ) = 3.3;
mat( 2, 2 ) = 0.0;
TS_ASSERT_THROWS( WGridTransformOrtho v( mat ), WPreconditionNotMet );
TS_ASSERT_THROWS( WGridTransformOrtho v( mat ), const WPreconditionNotMet& );
}
{
WMatrix< double > mat( 4, 4 );
......@@ -100,7 +100,7 @@ public:
mat( 1, 1 ) = 3.3;
mat( 2, 2 ) = 1.0;
TS_ASSERT_THROWS( WGridTransformOrtho v( mat ), WPreconditionNotMet );
TS_ASSERT_THROWS( WGridTransformOrtho v( mat ), const WPreconditionNotMet& );
}
{
WMatrix< double > mat( 4, 4 );
......
......@@ -51,7 +51,7 @@ public:
void testInstantiationWithName( void )
{
WPersonalInformation testInfo( WPersonalInformation::createDummyInformation() );
TS_ASSERT_THROWS_NOTHING( WSubject( testInfo ) );
TS_ASSERT_THROWS_NOTHING( WSubject subject( testInfo ) );
}
/**
......
......@@ -72,14 +72,14 @@ public:
boost::shared_ptr< WDataSetSingle > ds = buildTestData();
TS_ASSERT_THROWS( TPVO t( boost::shared_ptr< WDataSetSingle >(),
boost::bind( &WThreadedPerVoxelOperationTest::func, this, _1 ) ), WException );
TS_ASSERT_THROWS( TPVO t( ds, TPVO::FunctionType() ), WException );
boost::bind( &WThreadedPerVoxelOperationTest::func, this, _1 ) ), const WException& );
TS_ASSERT_THROWS( TPVO t( ds, TPVO::FunctionType() ), const WException& );
TS_ASSERT_THROWS( TPVO t( boost::shared_ptr< WDataSetSingle >( new WDataSetSingle( ds->getValueSet(),
boost::shared_ptr< WGrid >() ) ),
boost::bind( &WThreadedPerVoxelOperationTest::func, this, _1 ) ), WException );
boost::bind( &WThreadedPerVoxelOperationTest::func, this, _1 ) ), const WException& );
TS_ASSERT_THROWS( TPVO t( boost::shared_ptr< WDataSetSingle >( new WDataSetSingle( boost::shared_ptr< WValueSetBase >(),
ds->getGrid() ) ),
boost::bind( &WThreadedPerVoxelOperationTest::func, this, _1 ) ), WException );
boost::bind( &WThreadedPerVoxelOperationTest::func, this, _1 ) ), const WException& );
TS_ASSERT_THROWS_NOTHING( TPVO t( ds, boost::bind( &WThreadedPerVoxelOperationTest::func, this, _1 ) ) );
......
......@@ -139,7 +139,7 @@ public:
TS_ASSERT_DELTA( wtracking::WTrackingUtility::getDistanceToBoundary( g, v, z ), 0.75, TRACKING_EPS );
v = WVector3d( 1.0, 0.0, 0.0 ) + x * 0.5;
TS_ASSERT_THROWS( wtracking::WTrackingUtility::getDistanceToBoundary( g, v, x ), WException );
TS_ASSERT_THROWS( wtracking::WTrackingUtility::getDistanceToBoundary( g, v, x ), const WException& );
v -= x * 2.0 * TRACKING_EPS;
TS_ASSERT_DELTA( wtracking::WTrackingUtility::getDistanceToBoundary( g, v, x ), 2.0 * TRACKING_EPS, TRACKING_EPS );
......@@ -330,10 +330,10 @@ public:
// now lets do something wrong
wtracking::WThreadedTrackingFunction::IndexType i;
v0[ 0 ] = -1;
TS_ASSERT_THROWS( i = wtracking::WThreadedTrackingFunction::IndexType( g, v0, v1, numSeeds, seedsPerPosition ), WException );
TS_ASSERT_THROWS( i = wtracking::WThreadedTrackingFunction::IndexType( g, v0, v1, numSeeds, seedsPerPosition ), const WException& );
v0[ 0 ] = 0;
v1[ 1 ] = 5;
TS_ASSERT_THROWS( i = wtracking::WThreadedTrackingFunction::IndexType( g, v0, v1, numSeeds, seedsPerPosition ), WException );
TS_ASSERT_THROWS( i = wtracking::WThreadedTrackingFunction::IndexType( g, v0, v1, numSeeds, seedsPerPosition ), const WException& );
}
}
......
......@@ -158,9 +158,9 @@ public:
WValueSet< int8_t > set( 1, 2, v, W_DT_INT8 );
TS_ASSERT_THROWS_NOTHING( set.getSubArray( 0, 2 ) );
TS_ASSERT_THROWS_NOTHING( set.getSubArray( 3, 1 ) );
TS_ASSERT_THROWS( set.getSubArray( 4, 1 ), WException );
TS_ASSERT_THROWS( set.getSubArray( 3, 2 ), WException );
TS_ASSERT_THROWS( set.getSubArray( 2, 0 ), WException );
TS_ASSERT_THROWS( set.getSubArray( 4, 1 ), const WException& );
TS_ASSERT_THROWS( set.getSubArray( 3, 2 ), const WException& );
TS_ASSERT_THROWS( set.getSubArray( 2, 0 ), const WException& );
}
/**
......
......@@ -461,7 +461,7 @@ public:
initModules();
// try initializing twice
TS_ASSERT_THROWS( m1->initialize(), WModuleConnectorInitFailed );
TS_ASSERT_THROWS( m1->initialize(), const WModuleConnectorInitFailed& );
TS_ASSERT( m1->isInitialized()() );
}
......@@ -476,8 +476,8 @@ public:
initModules();
// connect input with input and output with output should fail
TS_ASSERT_THROWS( m1->m_input->connect( m2->m_input ), WModuleConnectorsIncompatible );
TS_ASSERT_THROWS( m1->m_output->connect( m2->m_output ), WModuleConnectorsIncompatible );
TS_ASSERT_THROWS( m1->m_input->connect( m2->m_input ), const WModuleConnectorsIncompatible& );
TS_ASSERT_THROWS( m1->m_output->connect( m2->m_output ), const WModuleConnectorsIncompatible& );
// there should be nothing connected.
TS_ASSERT( m1->m_output->m_connected.size() == 0 );
......@@ -507,7 +507,7 @@ public:
TS_ASSERT( m2->m_outputDerived->m_connected.size() == 1 );
// connect an input of derived type with output of base type
TS_ASSERT_THROWS( m1->m_output->connect( m2->m_inputDerived ), WModuleConnectorsIncompatible );
TS_ASSERT_THROWS( m1->m_output->connect( m2->m_inputDerived ), const WModuleConnectorsIncompatible& );
TS_ASSERT( m1->m_output->m_connected.size() == 0 );
TS_ASSERT( m1->m_inputDerived->m_connected.size() == 0 );
}
......
......@@ -38,7 +38,8 @@ Find_Package( OpenIGTLink QUIET )
IF( OpenIGTLink_FOUND )
# 2: INCLUDE_DIRECTORIES( ${LIBYOUNEED_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${OpenIGTLink_INCLUDE_DIRS} )
# Use system include to suppress warnings (during compilation) caused by the faulty OpenIGTLink header file
INCLUDE_DIRECTORIES( SYSTEM ${OpenIGTLink_INCLUDE_DIRS} )
# 3: LINK_DIRECTORIES( ${LIBYOUNEED_LIBRARY_DIRS} )
LINK_DIRECTORIES( ${OpenIGTLink_LIBRARY_DIRS} )
......
......@@ -234,10 +234,8 @@ WDataSetScalarSPtr WIGTLinkRemote::receiveImage( igtl::MessageHeader::Pointer he
float spacing[ 3 ];
int svsize[ 3 ];
int svoffset[ 3 ];
int scalarType;
igtl::Matrix4x4 mat;
scalarType = imgMsg->GetScalarType();
imgMsg->GetDimensions( size );
imgMsg->GetSpacing( spacing );
imgMsg->GetSubVolume( svsize, svoffset );
......
......@@ -102,6 +102,9 @@ COLLECT_COMPILE_FILES( "${CMAKE_CURRENT_SOURCE_DIR}" TARGET_CPP_FILES TARGET_H_F
SET( CMAKE_AUTOMOC ON )
SET( AUTOMOC_MOC_OPTIONS "${OW_CPP_FLAGS_INJECT}" )
# Exclude autogenerated WVersion.h (usally in versionHeader/core) from AUTOMOC mechanism to avoid cmake warning CMP0071 which comes with cmake version 3.10.
SET_PROPERTY(SOURCE "${CMAKE_BINARY_DIR}/${OW_VERSION_HEADER_DIRECTORY_RELATIVE}/${OW_INTERNAL_VERSION_HEADER_FILENAME}" PROPERTY SKIP_AUTOMOC ON)
# This is needed since the mocs will be generated there
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
......
......@@ -344,8 +344,12 @@ IF( ANDROID )
SET( OPENGL_FOUND ON )
# link against GLES 2
SET( OPENGL_LIBRARIES "GLESv2" )
SET( OPENGL_gl_LIBRARY "GLESv2" )
ELSE()
# The explicit setting of GLVND can be removed, when we set the minimum cmake version to 3.11 or higher.
# CMake Policy: CMP0072 https://cmake.org/cmake/help/git-stage/policy/CMP0072.html
IF( CMAKE_HOST_SYSTEM MATCHES "Linux" )
SET( OpenGL_GL_PREFERENCE "GLVND" )
ENDIF()
FIND_PACKAGE( OpenGL REQUIRED )
# include the OpenGL header paths
INCLUDE_DIRECTORIES( SYSTEM ${OPENGL_INCLUDE_DIR} )
......
......@@ -701,7 +701,7 @@ FUNCTION( SETUP_MODULE _MODULE_NAME _MODULE_SOURCE_DIR _MODULE_DEPENDENCIES _MOD
TARGET_LINK_LIBRARIES( ${MODULE_NAME} ${CMAKE_STANDARD_LIBRARIES}
${OW_LIB_OPENWALNUT}
${Boost_LIBRARIES}
${OPENGL_gl_LIBRARY}
${OPENGL_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES}
${ADDITIONAL_TARGET_LINK_LIBRARIES}
${_MODULE_DEPENDENCIES}
......
......@@ -22,7 +22,7 @@
#
#---------------------------------------------------------------------------
# This is a script executed during build time to genertae the WVersion.h headers. This is needed since CMake does not allow us to define the
# This is a script executed during build time to generate the WVersion.h headers. This is needed since CMake does not allow us to define the
# commands directly inside an ADD_CUSTOM_COMMAND call. An alternative to this would be SET_SOURCE_FILE_PROPERTIES which should be able to set the
# version as define for some files. But this caused the whole source to rebuild although it was only set for one file (bug? feature? we do not
# know.)
......