fix unittests on linux / enable on travis-ci
parent
b2643a3835
commit
d795491c48
10
.travis.yml
10
.travis.yml
|
@ -1,5 +1,5 @@
|
|||
before_install:
|
||||
- sudo apt-get install cmake
|
||||
- sudo apt-get install cmake libcppunit-dev
|
||||
|
||||
env:
|
||||
- TRAVIS_NO_EXPORT=YES
|
||||
|
@ -13,7 +13,9 @@ compiler:
|
|||
- gcc
|
||||
- clang
|
||||
|
||||
script: cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -STATIC_BUILD=$TRAVIS_STATIC_BUILD && make
|
||||
|
||||
|
||||
script:
|
||||
- cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -STATIC_BUILD=$TRAVIS_STATIC_BUILD
|
||||
- make
|
||||
- cd test/unit
|
||||
- ../../bin/unit
|
||||
|
||||
|
|
|
@ -210,16 +210,14 @@ IF ( ASSIMP_BUILD_SAMPLES)
|
|||
ADD_SUBDIRECTORY( samples/SimpleOpenGL/ )
|
||||
ENDIF ( ASSIMP_BUILD_SAMPLES )
|
||||
|
||||
IF ( WIN32 )
|
||||
option ( ASSIMP_BUILD_TESTS
|
||||
option ( ASSIMP_BUILD_TESTS
|
||||
"If the test suite for Assimp is built in addition to the library."
|
||||
ON
|
||||
)
|
||||
)
|
||||
|
||||
IF ( ASSIMP_BUILD_TESTS )
|
||||
IF ( ASSIMP_BUILD_TESTS )
|
||||
ADD_SUBDIRECTORY( test/ )
|
||||
ENDIF ( ASSIMP_BUILD_TESTS )
|
||||
ENDIF ( WIN32 )
|
||||
ENDIF ( ASSIMP_BUILD_TESTS )
|
||||
|
||||
IF(MSVC)
|
||||
option ( ASSIMP_INSTALL_PDB
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Assimp {
|
|||
// ---------------------------------------------------------------------------
|
||||
/** The GenFaceNormalsProcess computes vertex normals for all vertizes
|
||||
*/
|
||||
class ASSIMP_API_WINONLY GenVertexNormalsProcess : public BaseProcess
|
||||
class ASSIMP_API GenVertexNormalsProcess : public BaseProcess
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class JoinVerticesTest;
|
|||
* erases all but one of the copies. This usually reduces the number of vertices
|
||||
* in a mesh by a serious amount and is the standard form to render a mesh.
|
||||
*/
|
||||
class ASSIMP_API_WINONLY JoinVerticesProcess : public BaseProcess
|
||||
class ASSIMP_API JoinVerticesProcess : public BaseProcess
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ SOURCE_GROUP( unit FILES
|
|||
unit/BoostWorkaround/tupletest.cpp
|
||||
)
|
||||
|
||||
|
||||
if(WIN32)
|
||||
SET( CPPUNIT_SRCS
|
||||
../contrib/cppunit-1.12.1/src/cppunit/AdditionalMessage.cpp
|
||||
../contrib/cppunit-1.12.1/src/cppunit/Asserter.cpp
|
||||
|
@ -72,7 +72,9 @@ SET( CPPUNIT_SRCS
|
|||
../contrib/cppunit-1.12.1/src/cppunit/XmlOutputterHook.cpp
|
||||
)
|
||||
SOURCE_GROUP(cppunit FILES ${CPPUNIT_SRCS})
|
||||
|
||||
else()
|
||||
find_library(CPPUNIT_LIBRARY cppunit)
|
||||
endif()
|
||||
|
||||
SET( TEST_SRCS
|
||||
unit/utFindDegenerates.cpp
|
||||
|
@ -133,4 +135,4 @@ add_executable( unit
|
|||
|
||||
SET_PROPERTY(TARGET assimp PROPERTY DEBUG_POSTFIX ${ASSIMP_DEBUG_POSTFIX})
|
||||
|
||||
target_link_libraries ( unit assimp )
|
||||
target_link_libraries ( unit assimp ${CPPUNIT_LIBRARY} )
|
||||
|
|
|
@ -26,9 +26,8 @@ int main (int argc, char* argv[])
|
|||
|
||||
// .. and C. They should smoothly work together
|
||||
aiEnableVerboseLogging(AI_TRUE);
|
||||
aiAttachLogStream(&aiGetPredefinedLogStream(
|
||||
aiDefaultLogStream_FILE,
|
||||
"AssimpLog_C.txt"));
|
||||
aiLogStream logstream= aiGetPredefinedLogStream(aiDefaultLogStream_FILE, "AssimpLog_C.txt");
|
||||
aiAttachLogStream(&logstream);
|
||||
|
||||
|
||||
// ............................................................................
|
||||
|
|
|
@ -208,11 +208,11 @@ void ImporterTest :: testMultipleReads (void)
|
|||
|
||||
CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/test.x",flags));
|
||||
//CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/dwarf.x",flags)); # is in nonbsd
|
||||
CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/Testwuson.x",flags));
|
||||
CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/Testwuson.X",flags));
|
||||
CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/anim_test.x",flags));
|
||||
//CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/dwarf.x",flags)); # is in nonbsd
|
||||
|
||||
CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/anim_test.x",flags));
|
||||
CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/bcn_epileptic.x",flags));
|
||||
CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/BCN_Epileptic.X",flags));
|
||||
//CPPUNIT_ASSERT(pImp->ReadFile("../../test/models/X/dwarf.x",flags)); # is in nonbsd
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
namespace noboost {
|
||||
|
||||
#define ASSIMP_FORCE_NOBOOST
|
||||
#include "..\..\code\BoostWorkaround\boost\format.hpp"
|
||||
#include "../../code/BoostWorkaround/boost/format.hpp"
|
||||
using boost::format;
|
||||
using boost::str;
|
||||
|
||||
|
|
Loading…
Reference in New Issue