CMake: use bf_io_ prefix for IO tests
This simplifies running built-in IO tests with: ctest -R bf_io_ Also use "bf_io_" prefix for the libraries since it was already used by some and it's a useful hint the libraries are used for IO.
This commit is contained in:
parent
652aab0b31
commit
d2c271ec84
|
@ -57,28 +57,28 @@ set(LIB
|
||||||
|
|
||||||
if(WITH_OPENCOLLADA)
|
if(WITH_OPENCOLLADA)
|
||||||
list(APPEND LIB
|
list(APPEND LIB
|
||||||
bf_collada
|
bf_io_collada
|
||||||
)
|
)
|
||||||
add_definitions(-DWITH_COLLADA)
|
add_definitions(-DWITH_COLLADA)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_IO_WAVEFRONT_OBJ)
|
if(WITH_IO_WAVEFRONT_OBJ)
|
||||||
list(APPEND LIB
|
list(APPEND LIB
|
||||||
bf_wavefront_obj
|
bf_io_wavefront_obj
|
||||||
)
|
)
|
||||||
add_definitions(-DWITH_IO_WAVEFRONT_OBJ)
|
add_definitions(-DWITH_IO_WAVEFRONT_OBJ)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_IO_PLY)
|
if(WITH_IO_PLY)
|
||||||
list(APPEND LIB
|
list(APPEND LIB
|
||||||
bf_ply
|
bf_io_ply
|
||||||
)
|
)
|
||||||
add_definitions(-DWITH_IO_PLY)
|
add_definitions(-DWITH_IO_PLY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_IO_STL)
|
if(WITH_IO_STL)
|
||||||
list(APPEND LIB
|
list(APPEND LIB
|
||||||
bf_stl
|
bf_io_stl
|
||||||
)
|
)
|
||||||
add_definitions(-DWITH_IO_STL)
|
add_definitions(-DWITH_IO_STL)
|
||||||
endif()
|
endif()
|
||||||
|
@ -92,14 +92,14 @@ endif()
|
||||||
|
|
||||||
if(WITH_ALEMBIC)
|
if(WITH_ALEMBIC)
|
||||||
list(APPEND LIB
|
list(APPEND LIB
|
||||||
bf_alembic
|
bf_io_alembic
|
||||||
)
|
)
|
||||||
add_definitions(-DWITH_ALEMBIC)
|
add_definitions(-DWITH_ALEMBIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_USD)
|
if(WITH_USD)
|
||||||
list(APPEND LIB
|
list(APPEND LIB
|
||||||
bf_usd
|
bf_io_usd
|
||||||
)
|
)
|
||||||
add_definitions(-DWITH_USD)
|
add_definitions(-DWITH_USD)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -104,7 +104,7 @@ if(WITH_BOOST)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
blender_add_lib(bf_alembic "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
blender_add_lib(bf_io_alembic "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||||
|
|
||||||
if(WITH_GTESTS)
|
if(WITH_GTESTS)
|
||||||
set(TEST_SRC
|
set(TEST_SRC
|
||||||
|
@ -114,7 +114,7 @@ if(WITH_GTESTS)
|
||||||
set(TEST_INC
|
set(TEST_INC
|
||||||
)
|
)
|
||||||
set(TEST_LIB
|
set(TEST_LIB
|
||||||
bf_alembic
|
bf_io_alembic
|
||||||
)
|
)
|
||||||
include(GTestTesting)
|
include(GTestTesting)
|
||||||
blender_add_test_lib(bf_io_alembic_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
|
blender_add_test_lib(bf_io_alembic_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
|
||||||
|
|
|
@ -124,4 +124,4 @@ if(WITH_BUILDINFO)
|
||||||
add_definitions(-DWITH_BUILDINFO)
|
add_definitions(-DWITH_BUILDINFO)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
blender_add_lib(bf_collada "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
blender_add_lib(bf_io_collada "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||||
|
|
|
@ -60,7 +60,7 @@ set(LIB
|
||||||
extern_fmtlib
|
extern_fmtlib
|
||||||
)
|
)
|
||||||
|
|
||||||
blender_add_lib(bf_ply "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
blender_add_lib(bf_io_ply "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||||
|
|
||||||
if(WITH_GTESTS)
|
if(WITH_GTESTS)
|
||||||
set(TEST_SRC
|
set(TEST_SRC
|
||||||
|
@ -72,7 +72,7 @@ if(WITH_GTESTS)
|
||||||
../../../../tests/gtests
|
../../../../tests/gtests
|
||||||
)
|
)
|
||||||
set(TEST_LIB
|
set(TEST_LIB
|
||||||
bf_ply
|
bf_io_ply
|
||||||
)
|
)
|
||||||
include(GTestTesting)
|
include(GTestTesting)
|
||||||
blender_add_test_lib(bf_io_ply_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
|
blender_add_test_lib(bf_io_ply_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
|
||||||
|
|
|
@ -42,4 +42,4 @@ set(LIB
|
||||||
bf_io_common
|
bf_io_common
|
||||||
)
|
)
|
||||||
|
|
||||||
blender_add_lib(bf_stl "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
blender_add_lib(bf_io_stl "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||||
|
|
|
@ -209,13 +209,13 @@ if(WITH_OPENVDB)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
blender_add_lib(bf_usd "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
blender_add_lib(bf_io_usd "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||||
|
|
||||||
# RNA_prototypes.h
|
# RNA_prototypes.h
|
||||||
add_dependencies(bf_usd bf_rna)
|
add_dependencies(bf_io_usd bf_rna)
|
||||||
|
|
||||||
if(COMMAND target_precompile_headers)
|
if(COMMAND target_precompile_headers)
|
||||||
target_precompile_headers(bf_usd PRIVATE intern/usd_precomp.h)
|
target_precompile_headers(bf_io_usd PRIVATE intern/usd_precomp.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GTESTS)
|
if(WITH_GTESTS)
|
||||||
|
|
|
@ -69,7 +69,7 @@ if(WITH_TBB)
|
||||||
list(APPEND LIB ${TBB_LIBRARIES})
|
list(APPEND LIB ${TBB_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
blender_add_lib(bf_wavefront_obj "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
blender_add_lib(bf_io_wavefront_obj "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||||
|
|
||||||
if(WITH_GTESTS)
|
if(WITH_GTESTS)
|
||||||
set(TEST_SRC
|
set(TEST_SRC
|
||||||
|
@ -92,10 +92,10 @@ if(WITH_GTESTS)
|
||||||
${LIB}
|
${LIB}
|
||||||
|
|
||||||
bf_blenloader_tests
|
bf_blenloader_tests
|
||||||
bf_wavefront_obj
|
bf_io_wavefront_obj
|
||||||
)
|
)
|
||||||
|
|
||||||
include(GTestTesting)
|
include(GTestTesting)
|
||||||
blender_add_test_lib(bf_wavefront_obj_tests "${TEST_SRC}" "${TEST_INC}" "${INC_SYS}" "${TEST_LIB}")
|
blender_add_test_lib(bf_io_wavefront_obj_tests "${TEST_SRC}" "${TEST_INC}" "${INC_SYS}" "${TEST_LIB}")
|
||||||
add_dependencies(bf_wavefront_obj_tests bf_wavefront_obj)
|
add_dependencies(bf_io_wavefront_obj_tests bf_io_wavefront_obj)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -119,7 +119,7 @@ if(WITH_ALEMBIC)
|
||||||
../io/alembic
|
../io/alembic
|
||||||
)
|
)
|
||||||
list(APPEND LIB
|
list(APPEND LIB
|
||||||
bf_alembic
|
bf_io_alembic
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ if(WITH_USD)
|
||||||
../io/usd
|
../io/usd
|
||||||
)
|
)
|
||||||
list(APPEND LIB
|
list(APPEND LIB
|
||||||
bf_usd
|
bf_io_usd
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ set(LIB
|
||||||
${BOOST_LIBRARIES}
|
${BOOST_LIBRARIES}
|
||||||
${USD_LIBRARIES}
|
${USD_LIBRARIES}
|
||||||
${TBB_LIBRARIES}
|
${TBB_LIBRARIES}
|
||||||
bf_usd
|
bf_io_usd
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SRC
|
set(SRC
|
||||||
|
|
|
@ -878,7 +878,7 @@ if(WITH_ALEMBIC)
|
||||||
get_filename_component(ALEMBIC_ROOT_DIR ${real_include_dir} DIRECTORY)
|
get_filename_component(ALEMBIC_ROOT_DIR ${real_include_dir} DIRECTORY)
|
||||||
|
|
||||||
add_python_test(
|
add_python_test(
|
||||||
alembic_export_tests
|
bf_io_alembic_export_tests
|
||||||
${CMAKE_CURRENT_LIST_DIR}/alembic_export_tests.py
|
${CMAKE_CURRENT_LIST_DIR}/alembic_export_tests.py
|
||||||
--blender "${TEST_BLENDER_EXE}"
|
--blender "${TEST_BLENDER_EXE}"
|
||||||
--testdir "${TEST_SRC_DIR}/alembic"
|
--testdir "${TEST_SRC_DIR}/alembic"
|
||||||
|
@ -895,13 +895,13 @@ endif()
|
||||||
|
|
||||||
if(WITH_USD)
|
if(WITH_USD)
|
||||||
add_blender_test(
|
add_blender_test(
|
||||||
usd_export_test
|
bf_io_usd_export_test
|
||||||
--python ${CMAKE_CURRENT_LIST_DIR}/bl_usd_export_test.py
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_usd_export_test.py
|
||||||
--
|
--
|
||||||
--testdir "${TEST_SRC_DIR}/usd"
|
--testdir "${TEST_SRC_DIR}/usd"
|
||||||
)
|
)
|
||||||
add_blender_test(
|
add_blender_test(
|
||||||
usd_import_test
|
bf_io_usd_import_test
|
||||||
--python ${CMAKE_CURRENT_LIST_DIR}/bl_usd_import_test.py
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_usd_import_test.py
|
||||||
--
|
--
|
||||||
--testdir "${TEST_SRC_DIR}/usd"
|
--testdir "${TEST_SRC_DIR}/usd"
|
||||||
|
|
|
@ -39,7 +39,7 @@ endif()
|
||||||
# GENERAL PYTHON CORRECTNESS TESTS
|
# GENERAL PYTHON CORRECTNESS TESTS
|
||||||
macro(COLLADA_TEST module test_name blend_file)
|
macro(COLLADA_TEST module test_name blend_file)
|
||||||
add_test(
|
add_test(
|
||||||
NAME collada_${module}_${test_name}
|
NAME bf_io_collada_${module}_${test_name}
|
||||||
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS} ${TEST_SRC_DIR}/collada/${module}/${blend_file}
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS} ${TEST_SRC_DIR}/collada/${module}/${blend_file}
|
||||||
--python ${CMAKE_CURRENT_LIST_DIR}/${module}/test_${module}_${test_name}.py --
|
--python ${CMAKE_CURRENT_LIST_DIR}/${module}/test_${module}_${test_name}.py --
|
||||||
--testdir ${TEST_SRC_DIR}/collada/${module}
|
--testdir ${TEST_SRC_DIR}/collada/${module}
|
||||||
|
|
Loading…
Reference in New Issue