Merge branch 'cmake-library' into 'master'

use CMake library

See merge request OpenMesh/OpenMesh!288
This commit is contained in:
Jan Möbius
2021-01-15 10:12:11 +01:00
35 changed files with 100 additions and 888 deletions

View File

@@ -1,4 +1,4 @@
include (ACGCommon)
include (VCICommon)
include_directories (
..
@@ -39,13 +39,13 @@ if ( OPENMESH_BUILD_UNIT_TESTS )
# Create new target named unittests_hexmeshing
FILE(GLOB UNITTEST_SRC *.cc)
# Create unittest executable
acg_add_executable(unittests ${UNITTEST_SRC})
acg_add_executable(unittests_customvec ${UNITTEST_SRC})
acg_add_executable(unittests_doublevec ${UNITTEST_SRC})
vci_add_executable(unittests ${UNITTEST_SRC})
vci_add_executable(unittests_customvec ${UNITTEST_SRC})
vci_add_executable(unittests_doublevec ${UNITTEST_SRC})
target_compile_definitions(unittests_customvec PRIVATE TEST_CUSTOM_TRAITS)
target_compile_definitions(unittests_doublevec PRIVATE TEST_DOUBLE_TRAITS)
# For the unittest we don't want the install rpath as set by acg_add_executable
# For the unittest we don't want the install rpath as set by vci_add_executable
set_target_properties ( unittests PROPERTIES BUILD_WITH_INSTALL_RPATH 0 )
set_target_properties ( unittests_customvec PROPERTIES BUILD_WITH_INSTALL_RPATH 0 )
set_target_properties ( unittests_doublevec PROPERTIES BUILD_WITH_INSTALL_RPATH 0 )
@@ -120,9 +120,9 @@ if ( OPENMESH_BUILD_UNIT_TESTS )
endforeach(TAR)
endif()
acg_copy_after_build(unittests ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/)
acg_copy_after_build(unittests_customvec ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/)
acg_copy_after_build(unittests_doublevec ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/)
vci_copy_after_build(unittests ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/)
vci_copy_after_build(unittests_customvec ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/)
vci_copy_after_build(unittests_doublevec ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/)
add_test(NAME AllTestsIn_OpenMesh_tests WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Unittests" COMMAND "${CMAKE_BINARY_DIR}/Unittests/unittests")
add_test(NAME AllTestsIn_OpenMesh_tests_with_minimal_vector WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Unittests" COMMAND "${CMAKE_BINARY_DIR}/Unittests/unittests_customvec")