CMake: use RUNTIME_OUTPUT_DIRECTORY rather than setting OUTPUT_NAME each time
This commit is contained in:
parent
6d403d9ad4
commit
974ada25e4
|
@ -2,6 +2,8 @@ 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})
|
||||||
|
|
||||||
|
string(APPEND CMAKE_RUNTIME_OUTPUT_DIRECTORY "/Tests")
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -13,10 +15,7 @@ macro(add_dolphin_test target)
|
||||||
${ARGN}
|
${ARGN}
|
||||||
$<TARGET_OBJECTS:unittests_stubhost>
|
$<TARGET_OBJECTS:unittests_stubhost>
|
||||||
)
|
)
|
||||||
set_target_properties(${target} PROPERTIES
|
set_target_properties(${target} PROPERTIES FOLDER Tests)
|
||||||
OUTPUT_NAME Tests/${target}
|
|
||||||
FOLDER Tests
|
|
||||||
)
|
|
||||||
target_link_libraries(${target} core gtest_main)
|
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})
|
||||||
|
|
Loading…
Reference in New Issue