Skip to content

Commit

Permalink
Fix unit test execution when building in shared linking mode
Browse files Browse the repository at this point in the history
The unit test is built only when static linking, but the test
itself was still being invoked when running 'ctest' in shared
linking mode. This leads to the following test failure in 'ctest':

'Could not find executable vvenc_unit_test'.

This adds a fix so the unit test is not run in shared builds.
  • Loading branch information
dbermond committed Dec 14, 2024
1 parent 0c2c21e commit 42763a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/modules/vvencTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ add_test( NAME Test_vvenclibtest-sdk_default COMMAND vvenclibtest 4
add_test( NAME Test_vvenclibtest-sdk_stringapi_interface COMMAND vvenclibtest 5 )
add_test( NAME Test_vvenclibtest-timestamps COMMAND vvenclibtest 6 )

add_test( NAME Test_vvenc_unit_test COMMAND vvenc_unit_test )
if( NOT BUILD_SHARED_LIBS )
add_test( NAME Test_vvenc_unit_test COMMAND vvenc_unit_test )
endif()

set( CLEANUP_TEST_FILES "" )

Expand Down

0 comments on commit 42763a9

Please sign in to comment.