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:
Campbell Barton 2023-09-23 20:22:19 +10:00
parent 652aab0b31
commit d2c271ec84
11 changed files with 26 additions and 26 deletions

View File

@ -57,28 +57,28 @@ set(LIB
if(WITH_OPENCOLLADA)
list(APPEND LIB
bf_collada
bf_io_collada
)
add_definitions(-DWITH_COLLADA)
endif()
if(WITH_IO_WAVEFRONT_OBJ)
list(APPEND LIB
bf_wavefront_obj
bf_io_wavefront_obj
)
add_definitions(-DWITH_IO_WAVEFRONT_OBJ)
endif()
if(WITH_IO_PLY)
list(APPEND LIB
bf_ply
bf_io_ply
)
add_definitions(-DWITH_IO_PLY)
endif()
if(WITH_IO_STL)
list(APPEND LIB
bf_stl
bf_io_stl
)
add_definitions(-DWITH_IO_STL)
endif()
@ -92,14 +92,14 @@ endif()
if(WITH_ALEMBIC)
list(APPEND LIB
bf_alembic
bf_io_alembic
)
add_definitions(-DWITH_ALEMBIC)
endif()
if(WITH_USD)
list(APPEND LIB
bf_usd
bf_io_usd
)
add_definitions(-DWITH_USD)
endif()

View File

@ -104,7 +104,7 @@ if(WITH_BOOST)
)
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)
set(TEST_SRC
@ -114,7 +114,7 @@ if(WITH_GTESTS)
set(TEST_INC
)
set(TEST_LIB
bf_alembic
bf_io_alembic
)
include(GTestTesting)
blender_add_test_lib(bf_io_alembic_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")

View File

@ -124,4 +124,4 @@ if(WITH_BUILDINFO)
add_definitions(-DWITH_BUILDINFO)
endif()
blender_add_lib(bf_collada "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
blender_add_lib(bf_io_collada "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")

View File

@ -60,7 +60,7 @@ set(LIB
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)
set(TEST_SRC
@ -72,7 +72,7 @@ if(WITH_GTESTS)
../../../../tests/gtests
)
set(TEST_LIB
bf_ply
bf_io_ply
)
include(GTestTesting)
blender_add_test_lib(bf_io_ply_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")

View File

@ -42,4 +42,4 @@ set(LIB
bf_io_common
)
blender_add_lib(bf_stl "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
blender_add_lib(bf_io_stl "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")

View File

@ -209,13 +209,13 @@ if(WITH_OPENVDB)
)
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
add_dependencies(bf_usd bf_rna)
add_dependencies(bf_io_usd bf_rna)
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()
if(WITH_GTESTS)

View File

@ -69,7 +69,7 @@ if(WITH_TBB)
list(APPEND LIB ${TBB_LIBRARIES})
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)
set(TEST_SRC
@ -92,10 +92,10 @@ if(WITH_GTESTS)
${LIB}
bf_blenloader_tests
bf_wavefront_obj
bf_io_wavefront_obj
)
include(GTestTesting)
blender_add_test_lib(bf_wavefront_obj_tests "${TEST_SRC}" "${TEST_INC}" "${INC_SYS}" "${TEST_LIB}")
add_dependencies(bf_wavefront_obj_tests bf_wavefront_obj)
blender_add_test_lib(bf_io_wavefront_obj_tests "${TEST_SRC}" "${TEST_INC}" "${INC_SYS}" "${TEST_LIB}")
add_dependencies(bf_io_wavefront_obj_tests bf_io_wavefront_obj)
endif()

View File

@ -119,7 +119,7 @@ if(WITH_ALEMBIC)
../io/alembic
)
list(APPEND LIB
bf_alembic
bf_io_alembic
)
endif()
@ -129,7 +129,7 @@ if(WITH_USD)
../io/usd
)
list(APPEND LIB
bf_usd
bf_io_usd
)
endif()

View File

@ -70,7 +70,7 @@ set(LIB
${BOOST_LIBRARIES}
${USD_LIBRARIES}
${TBB_LIBRARIES}
bf_usd
bf_io_usd
)
set(SRC

View File

@ -878,7 +878,7 @@ if(WITH_ALEMBIC)
get_filename_component(ALEMBIC_ROOT_DIR ${real_include_dir} DIRECTORY)
add_python_test(
alembic_export_tests
bf_io_alembic_export_tests
${CMAKE_CURRENT_LIST_DIR}/alembic_export_tests.py
--blender "${TEST_BLENDER_EXE}"
--testdir "${TEST_SRC_DIR}/alembic"
@ -895,13 +895,13 @@ endif()
if(WITH_USD)
add_blender_test(
usd_export_test
bf_io_usd_export_test
--python ${CMAKE_CURRENT_LIST_DIR}/bl_usd_export_test.py
--
--testdir "${TEST_SRC_DIR}/usd"
)
add_blender_test(
usd_import_test
bf_io_usd_import_test
--python ${CMAKE_CURRENT_LIST_DIR}/bl_usd_import_test.py
--
--testdir "${TEST_SRC_DIR}/usd"

View File

@ -39,7 +39,7 @@ endif()
# GENERAL PYTHON CORRECTNESS TESTS
macro(COLLADA_TEST module test_name blend_file)
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}
--python ${CMAKE_CURRENT_LIST_DIR}/${module}/test_${module}_${test_name}.py --
--testdir ${TEST_SRC_DIR}/collada/${module}