Blame winpr/libwinpr/crt/test/CMakeLists.txt

Packit 1fb8d4
Packit 1fb8d4
set(MODULE_NAME "TestCrt")
Packit 1fb8d4
set(MODULE_PREFIX "TEST_CRT")
Packit 1fb8d4
Packit 1fb8d4
set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c)
Packit 1fb8d4
Packit 1fb8d4
set(${MODULE_PREFIX}_TESTS
Packit 1fb8d4
	TestTypes.c
Packit 1fb8d4
	TestFormatSpecifiers.c
Packit 1fb8d4
	TestAlignment.c
Packit 1fb8d4
	TestString.c
Packit 1fb8d4
	TestUnicodeConversion.c)
Packit 1fb8d4
Packit 1fb8d4
create_test_sourcelist(${MODULE_PREFIX}_SRCS
Packit 1fb8d4
	${${MODULE_PREFIX}_DRIVER}
Packit 1fb8d4
	${${MODULE_PREFIX}_TESTS})
Packit 1fb8d4
Packit 1fb8d4
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
Packit 1fb8d4
Packit 1fb8d4
target_link_libraries(${MODULE_NAME} winpr)
Packit 1fb8d4
Packit 1fb8d4
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
Packit 1fb8d4
Packit 1fb8d4
foreach(test ${${MODULE_PREFIX}_TESTS})
Packit 1fb8d4
	get_filename_component(TestName ${test} NAME_WE)
Packit 1fb8d4
	add_test(${TestName} ${TESTING_OUTPUT_DIRECTORY}/${MODULE_NAME} ${TestName})
Packit 1fb8d4
endforeach()
Packit 1fb8d4
Packit 1fb8d4
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")
Packit 1fb8d4