cmake: Fix tests with BUILD_CXXLIBS or BUILD_PROGRAMS off
Fixes a regression introduced in 10797d5896
This commit is contained in:
parent
6debf337c8
commit
179cdce1db
@ -6,15 +6,19 @@ if(NOT UNIX)
|
|||||||
add_test(NAME libFLAC
|
add_test(NAME libFLAC
|
||||||
COMMAND $<TARGET_FILE:test_libFLAC>
|
COMMAND $<TARGET_FILE:test_libFLAC>
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
|
if(BUILD_CXXLIBS)
|
||||||
add_test(NAME libFLAC++
|
add_test(NAME libFLAC++
|
||||||
COMMAND $<TARGET_FILE:test_libFLAC++>
|
COMMAND $<TARGET_FILE:test_libFLAC++>
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
if(BUILD_PROGRAMS)
|
||||||
add_test(NAME flac_help
|
add_test(NAME flac_help
|
||||||
COMMAND $<TARGET_FILE:flacapp> --help
|
COMMAND $<TARGET_FILE:flacapp> --help
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
add_test(NAME metaflac_help
|
add_test(NAME metaflac_help
|
||||||
COMMAND $<TARGET_FILE:metaflac> --help
|
COMMAND $<TARGET_FILE:metaflac> --help
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
|
endif()
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user