mirror of
https://github.com/SFML/SFML.git
synced 2025-02-19 06:39:59 +08:00
Renamed test targets to test-sfml-module structure
This commit is contained in:
parent
1d768839e7
commit
7e7216f598
@ -306,11 +306,8 @@ function(sfml_add_test target SOURCES DEPENDS)
|
|||||||
# set a source group for the source files
|
# set a source group for the source files
|
||||||
source_group("" FILES ${SOURCES})
|
source_group("" FILES ${SOURCES})
|
||||||
|
|
||||||
# check whether resources must be added in target
|
|
||||||
set(target_input ${SOURCES})
|
|
||||||
|
|
||||||
# create the target
|
# create the target
|
||||||
add_executable(${target} ${target_input})
|
add_executable(${target} ${SOURCES})
|
||||||
|
|
||||||
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
|
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
|
||||||
set_target_properties(${target} PROPERTIES FOLDER "Tests")
|
set_target_properties(${target} PROPERTIES FOLDER "Tests")
|
||||||
@ -462,4 +459,3 @@ function(sfml_export_targets)
|
|||||||
DESTINATION ${config_package_location}
|
DESTINATION ${config_package_location}
|
||||||
COMPONENT devel)
|
COMPONENT devel)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ SET(SYSTEM_SRC
|
|||||||
"${SRCROOT}/TestUtilities/SystemUtil.hpp"
|
"${SRCROOT}/TestUtilities/SystemUtil.hpp"
|
||||||
"${SRCROOT}/TestUtilities/SystemUtil.cpp"
|
"${SRCROOT}/TestUtilities/SystemUtil.cpp"
|
||||||
)
|
)
|
||||||
sfml_add_test(systemtest "${SYSTEM_SRC}" sfml-system)
|
sfml_add_test(test-sfml-system "${SYSTEM_SRC}" sfml-system)
|
||||||
|
|
||||||
if(SFML_BUILD_WINDOW)
|
if(SFML_BUILD_WINDOW)
|
||||||
SET(WINDOW_SRC
|
SET(WINDOW_SRC
|
||||||
@ -20,7 +20,7 @@ if(SFML_BUILD_WINDOW)
|
|||||||
"${SRCROOT}/TestUtilities/WindowUtil.hpp"
|
"${SRCROOT}/TestUtilities/WindowUtil.hpp"
|
||||||
"${SRCROOT}/TestUtilities/WindowUtil.cpp"
|
"${SRCROOT}/TestUtilities/WindowUtil.cpp"
|
||||||
)
|
)
|
||||||
sfml_add_test(windowtest "${WINDOW_SRC}" sfml-window)
|
sfml_add_test(test-sfml-window "${WINDOW_SRC}" sfml-window)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SFML_BUILD_GRAPHICS)
|
if(SFML_BUILD_GRAPHICS)
|
||||||
@ -30,12 +30,12 @@ if(SFML_BUILD_GRAPHICS)
|
|||||||
"${SRCROOT}/TestUtilities/GraphicsUtil.hpp"
|
"${SRCROOT}/TestUtilities/GraphicsUtil.hpp"
|
||||||
"${SRCROOT}/TestUtilities/GraphicsUtil.cpp"
|
"${SRCROOT}/TestUtilities/GraphicsUtil.cpp"
|
||||||
)
|
)
|
||||||
sfml_add_test(graphicstest "${GRAPHICS_SRC}" sfml-graphics)
|
sfml_add_test(test-sfml-graphics "${GRAPHICS_SRC}" sfml-graphics)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Automatically run the tests at the end of the build
|
# Automatically run the tests at the end of the build
|
||||||
add_custom_target(runtests ALL
|
add_custom_target(runtests ALL
|
||||||
DEPENDS systemtest windowtest graphicstest
|
DEPENDS test-sfml-system test-sfml-window test-sfml-graphics
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_command(TARGET runtests
|
add_custom_command(TARGET runtests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user