Skip to content

Commit

Permalink
Fixing issue with OpenVDB test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Dec 21, 2023
1 parent 9e4e79b commit af68f4e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ find_package(BZip2 REQUIRED)
find_package(CPPUNIT REQUIRED) # for unit tests
pkg_check_modules(TCLAP tclap REQUIRED)
pkg_check_modules(EIGEN eigen3 REQUIRED)
pkg_check_modules(CRYPTO libcrypto REQUIRED) # for unit tests

# Set include folders
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
Expand Down Expand Up @@ -137,4 +138,4 @@ endif()
###
# Installing
##
install (TARGETS den2obj DESTINATION bin)
install (TARGETS den2obj DESTINATION bin)
21 changes: 15 additions & 6 deletions src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,35 @@
add_library(unittest STATIC unittest.cpp)

# set executables
SET(EXECUTABLES TestIsosurface TestScalarField TestD2OFileFormat TestFileCreation)
SET(EXECUTABLES TestIsosurface TestScalarField TestD2OFileFormat)

# remove this test from the list as it takes too long
# only add this test when not using GCOV
if(NOT USE_GCOV)
list(APPEND EXECUTABLES TestGenerator)
endif()

# only add this test when not using GCOV
if(USE_GCOV)
list(APPEND EXECUTABLES TestFileCreation)
endif()

#######################################################
# Add executables
#######################################################
add_executable(TestIsosurface test_isosurface.cpp)
add_executable(TestScalarField test_scalarfield.cpp)
add_executable(TestD2OFileFormat test_d2o_fileformat.cpp)
add_executable(TestFileCreation test_file_creation.cpp)

# remove this test from the list as it takes too long
# only add this test when not using GCOV
if(NOT USE_GCOV)
add_executable(TestGenerator test_generator.cpp)
endif()

# only add this test when not using OpenVDB
if(USE_GCOV)
add_executable(TestFileCreation test_file_creation.cpp)
endif()

#######################################################
# Link mkmsources and other dependencies
#######################################################
Expand All @@ -67,8 +76,8 @@ foreach(testexec ${EXECUTABLES})
${LIBLZMA_LIBRARIES}
${ZLIB_LIBRARIES}
${BZIP2_LIBRARIES}
-lgcov
-lcrypto)
${CRYPTO_LIBRARIES}
-lgcov)
set_target_properties(${testexec} PROPERTIES COMPILE_FLAGS "--coverage")
add_test(NAME ${testexec} COMMAND ${testexec})
set_tests_properties(${testexec} PROPERTIES FIXTURES_REQUIRED Dataset)
Expand Down

0 comments on commit af68f4e

Please sign in to comment.