1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

fix: do not test utils if not building utils (#4946)

Setting `-DENABLE_UTILS=0 -DENABLE_TESTS=1` causes CMake errors due to
tests/utils/CMakeLists.txt referencing
`$<TARGET_FILE:transmission-show>` which is undefined.  Fixed by
including the tests/utils/ directory only if `ENABLE_UTILS` is true.
This commit is contained in:
fghzxm 2023-02-21 13:43:05 +08:00 committed by GitHub
parent 3c9d997f47
commit db118e7998
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,3 +1,5 @@
add_subdirectory(gtest)
add_subdirectory(libtransmission)
add_subdirectory(utils)
if(ENABLE_UTILS)
add_subdirectory(utils)
endif()