mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 07:49:19 +01:00
CMake: specify unittests libs directly in target_link_libraries
This commit is contained in:
parent
8e57a0ff14
commit
6d403d9ad4
@ -2,8 +2,6 @@ enable_testing()
|
|||||||
add_custom_target(unittests)
|
add_custom_target(unittests)
|
||||||
add_custom_command(TARGET unittests POST_BUILD COMMAND ${CMAKE_CTEST_COMMAND})
|
add_custom_command(TARGET unittests POST_BUILD COMMAND ${CMAKE_CTEST_COMMAND})
|
||||||
|
|
||||||
set(LIBS core gtest_main)
|
|
||||||
|
|
||||||
# Since this is a Core dependency, it can't be linked as a normal library.
|
# Since this is a Core dependency, it can't be linked as a normal library.
|
||||||
# Otherwise CMake inserts the library after core, but before other core
|
# Otherwise CMake inserts the library after core, but before other core
|
||||||
# dependencies like videocommon which also use Host_ functions, which makes the
|
# dependencies like videocommon which also use Host_ functions, which makes the
|
||||||
@ -19,7 +17,7 @@ macro(add_dolphin_test target)
|
|||||||
OUTPUT_NAME Tests/${target}
|
OUTPUT_NAME Tests/${target}
|
||||||
FOLDER Tests
|
FOLDER Tests
|
||||||
)
|
)
|
||||||
target_link_libraries(${target} ${LIBS})
|
target_link_libraries(${target} core gtest_main)
|
||||||
add_dependencies(unittests ${target})
|
add_dependencies(unittests ${target})
|
||||||
add_test(NAME ${target} COMMAND ${target})
|
add_test(NAME ${target} COMMAND ${target})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user