aboutsummaryrefslogtreecommitdiff
path: root/test/common/CMakeLists.txt
blob: 683c829553abcc0822c2eb13c7023c44364f5285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
add_executable(CruBaseTest
	Event2Test.cpp
	HandlerRegistryTest.cpp
	PropertyTreeTest.cpp
	SelfResolvableTest.cpp
	StringTest.cpp
	StringToNumberConverterTest.cpp
	StringUtilTest.cpp
	SubProcessTest.cpp
)
target_link_libraries(CruBaseTest PRIVATE CruBase CruTestBase)

add_executable(CruTestHelperEcho
	SubProcessHelper/CruEcho.cpp
)

add_executable(CruTestHelperTee
	SubProcessHelper/CruTee.cpp
)

target_compile_definitions(CruBaseTest PRIVATE
	CRU_TEST_HELPER_ECHO_LOCATION="$<TARGET_FILE:CruTestHelperEcho>"
	CRU_TEST_HELPER_TEE_LOCATION="$<TARGET_FILE:CruTestHelperTee>"
)

if (UNIX AND NOT EMSCRIPTEN)
	target_sources(CruBaseTest PRIVATE
		platform/unix/UnixFileTest.cpp
		platform/unix/UnixFileStreamTest.cpp
	)
endif()

if (WIN32)
	target_sources(CruBaseTest PRIVATE
		platform/win/StreamConvertTest.cpp
		platform/win/Win32FileStreamTest.cpp
	)
endif()

cru_catch_discover_tests(CruBaseTest)