Skip to content

Commit

Permalink
Fix module configuration (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Meakk authored Apr 29, 2022
1 parent 8cb2fc5 commit f461044
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ if(F3D_MODULE_RAYTRACING)
f3d_test(NAME TestOSPRayPointCloud DATA pointsCloud.vtp ARGS -r --point-size=20)
f3d_test(NAME TestOSPRayDenoise DATA suzanne.ply ARGS -rd --samples=1)
f3d_test(NAME TestInteractionOSPRayDenoise DATA suzanne.ply ARGS --samples=1 INTERACTION) #RD
f3d_test(NAME TestVersionRaytracing ARGS --version REGEXP "Raytracing module: ON")
else(F3D_MODULE_RAYTRACING)
f3d_test(NAME TestInteractionOSPRayDenoiseNoRaytracing DATA suzanne.ply ARGS INTERACTION NO_BASELINE REGEXP "Raytracing options can't be used if F3D has not been built with raytracing") #RD
endif()
Expand All @@ -218,18 +219,24 @@ if(F3D_MODULE_EXODUS)
f3d_test(NAME TestInteractionAnimationGenericImporter DATA small.ex2 INTERACTION NO_BASELINE)#Space;Space;
# Test Generic Importer Verbose animation
f3d_test(NAME TestVerboseGenericImporterAnimation DATA small.ex2 ARGS --verbose NO_BASELINE REGEXP "0: default")

f3d_test(NAME TestVersionExodus ARGS --version REGEXP "Exodus module: ON")
endif()

if(F3D_MODULE_OCCT)
f3d_test(NAME TestSTEP DATA cube.stp DEFAULT_LIGHTS)
f3d_test(NAME TestIGES DATA spacer.igs DEFAULT_LIGHTS)

f3d_test(NAME TestVersionOCCT ARGS --version REGEXP "OpenCASCADE module: .\\..\\.. (.+)")
endif()

if(F3D_MODULE_ASSIMP)
f3d_test(NAME TestOFF DATA teapot.off ARGS --up=+Z)
f3d_test(NAME TestDXF DATA PinkEggFromLW.dxf ARGS --bg-color=1,1,1 -p)
f3d_test(NAME TestFBX DATA phong_cube.fbx)

f3d_test(NAME TestVersionAssimp ARGS --version REGEXP "Assimp module: .\\..\\..")

if(VTK_VERSION VERSION_GREATER 9.0.20210728) # for TGA support and embedded textures
f3d_test(NAME TestDAE DATA duck.dae)

Expand All @@ -248,6 +255,7 @@ endif()

if(F3D_MODULE_ALEMBIC)
f3d_test(NAME TestABC DATA suzanne.abc)
f3d_test(NAME TestVersionAlembic ARGS --version REGEXP "Alembic module: .\\..\\..")
endif()

## Interaction Tests
Expand Down
2 changes: 2 additions & 0 deletions src/library/VTKExtensions/Core/vtkF3DConfigure.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ static const std::string F3D_EXIT_HOTKEY_SYM = "Escape";
#cmakedefine01 F3D_MODULE_OCCT
#cmakedefine01 F3D_MODULE_OCCT_XCAF
#cmakedefine01 F3D_MODULE_ASSIMP
#cmakedefine01 F3D_MODULE_ALEMBIC
#cmakedefine F3D_OCCT_VERSION "@F3D_OCCT_VERSION@"
#cmakedefine F3D_ASSIMP_VERSION "@F3D_ASSIMP_VERSION@"
#cmakedefine F3D_ALEMBIC_VERSION "@F3D_ALEMBIC_VERSION@"
#endif
2 changes: 2 additions & 0 deletions src/library/VTKExtensions/Readers/vtkF3DOCCTReader.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "vtkF3DOCCTReader.h"

#include "vtkF3DConfigure.h"

#include <BRepAdaptor_Surface.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <BRep_Tool.hxx>
Expand Down
8 changes: 8 additions & 0 deletions src/library/f3d_engine.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include "F3DReaderFactory.h"

#include "vtkF3DConfigure.h"

#include <vtkVersion.h>

namespace f3d
Expand Down Expand Up @@ -134,6 +136,12 @@ void engine::printVersion()
version += F3D_ASSIMP_VERSION;
#else
version += "OFF";
#endif
version += "\nAlembic module: ";
#if F3D_MODULE_ALEMBIC
version += F3D_ALEMBIC_VERSION;
#else
version += "OFF";
#endif
version += "\nVTK version: ";
version += std::string(VTK_VERSION) + std::string(" (build ") +
Expand Down

0 comments on commit f461044

Please sign in to comment.