diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 8 | ||||
-rw-r--r-- | test/common/CMakeLists.txt | 7 | ||||
-rw-r--r-- | test/platform/CMakeLists.txt | 7 | ||||
-rw-r--r-- | test/platform/graphics/direct2d/CMakeLists.txt | 6 | ||||
-rw-r--r-- | test/platform/graphics/direct2d/ConvertTest.cpp (renamed from test/win/graphics/direct/ConvertTest.cpp) | 0 | ||||
-rw-r--r-- | test/toml/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/win/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/win/graphics/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/win/graphics/direct/CMakeLists.txt | 13 | ||||
-rw-r--r-- | test/xml/CMakeLists.txt | 2 |
10 files changed, 13 insertions, 34 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c354fba9..c4133193 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,14 +1,10 @@ include(Catch) -add_library(cru_test_base INTERFACE) -target_link_libraries(cru_test_base INTERFACE Catch2::Catch2WithMain) +add_library(CruTestBase INTERFACE) +target_link_libraries(CruTestBase INTERFACE Catch2::Catch2WithMain) add_subdirectory(common) add_subdirectory(platform) add_subdirectory(xml) add_subdirectory(toml) add_subdirectory(ui) - -if(WIN32) - add_subdirectory(win) -endif() diff --git a/test/common/CMakeLists.txt b/test/common/CMakeLists.txt index 17cfa85b..b3436105 100644 --- a/test/common/CMakeLists.txt +++ b/test/common/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(CruBaseTest StringToNumberConverterTest.cpp StringUtilTest.cpp ) -target_link_libraries(CruBaseTest PRIVATE CruBase cru_test_base) +target_link_libraries(CruBaseTest PRIVATE CruBase CruTestBase) if (UNIX) target_sources(CruBaseTest PRIVATE @@ -18,11 +18,6 @@ if (WIN32) platform/win/StreamConvertTest.cpp platform/win/Win32FileStreamTest.cpp ) - - add_custom_command(TARGET CruBaseTest POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CruBaseTest> $<TARGET_FILE_DIR:CruBaseTest> - COMMAND_EXPAND_LISTS - ) endif() catch_discover_tests(CruBaseTest) diff --git a/test/platform/CMakeLists.txt b/test/platform/CMakeLists.txt index 37bd7e4a..5116d54d 100644 --- a/test/platform/CMakeLists.txt +++ b/test/platform/CMakeLists.txt @@ -2,13 +2,10 @@ add_executable(CruPlatformBaseTest ColorTest.cpp MatrixTest.cpp ) -target_link_libraries(CruPlatformBaseTest PRIVATE CruPlatformBase cru_test_base) +target_link_libraries(CruPlatformBaseTest PRIVATE CruPlatformBase CruTestBase) if (WIN32) - add_custom_command(TARGET CruPlatformBaseTest POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CruPlatformBaseTest> $<TARGET_FILE_DIR:CruPlatformBaseTest> - COMMAND_EXPAND_LISTS - ) + add_subdirectory(graphics/direct2d) endif() catch_discover_tests(CruPlatformBaseTest) diff --git a/test/platform/graphics/direct2d/CMakeLists.txt b/test/platform/graphics/direct2d/CMakeLists.txt new file mode 100644 index 00000000..66a07d15 --- /dev/null +++ b/test/platform/graphics/direct2d/CMakeLists.txt @@ -0,0 +1,6 @@ +add_executable(CruPlatformGraphicsDirect2dTest + ConvertTest.cpp +) +target_link_libraries(CruPlatformGraphicsDirect2dTest PRIVATE CruPlatformGraphicsDirect2d CruTestBase) + +catch_discover_tests(CruPlatformGraphicsDirect2dTest) diff --git a/test/win/graphics/direct/ConvertTest.cpp b/test/platform/graphics/direct2d/ConvertTest.cpp index c30bb6a5..c30bb6a5 100644 --- a/test/win/graphics/direct/ConvertTest.cpp +++ b/test/platform/graphics/direct2d/ConvertTest.cpp diff --git a/test/toml/CMakeLists.txt b/test/toml/CMakeLists.txt index 03f81047..30705585 100644 --- a/test/toml/CMakeLists.txt +++ b/test/toml/CMakeLists.txt @@ -1,7 +1,7 @@ add_executable(CruTomlTest ParserTest.cpp ) -target_link_libraries(CruTomlTest PRIVATE CruToml cru_test_base) +target_link_libraries(CruTomlTest PRIVATE CruToml CruTestBase) if (WIN32) add_custom_command(TARGET CruTomlTest POST_BUILD diff --git a/test/win/CMakeLists.txt b/test/win/CMakeLists.txt deleted file mode 100644 index 0ebdd7fe..00000000 --- a/test/win/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(graphics) diff --git a/test/win/graphics/CMakeLists.txt b/test/win/graphics/CMakeLists.txt deleted file mode 100644 index c90537ac..00000000 --- a/test/win/graphics/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(direct) diff --git a/test/win/graphics/direct/CMakeLists.txt b/test/win/graphics/direct/CMakeLists.txt deleted file mode 100644 index c2eb0630..00000000 --- a/test/win/graphics/direct/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -add_executable(CruPlatformGraphicsDirect2dTest - ConvertTest.cpp -) -target_link_libraries(CruPlatformGraphicsDirect2dTest PRIVATE CruPlatformGraphicsDirect2d cru_test_base) - -if (WIN32) - add_custom_command(TARGET CruPlatformGraphicsDirect2dTest POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:CruPlatformGraphicsDirect2dTest> $<TARGET_FILE_DIR:CruPlatformGraphicsDirect2dTest> - COMMAND_EXPAND_LISTS - ) -endif() - -catch_discover_tests(CruPlatformGraphicsDirect2dTest) diff --git a/test/xml/CMakeLists.txt b/test/xml/CMakeLists.txt index 73838a35..b000c368 100644 --- a/test/xml/CMakeLists.txt +++ b/test/xml/CMakeLists.txt @@ -1,7 +1,7 @@ add_executable(CruXmlTest ParserTest.cpp ) -target_link_libraries(CruXmlTest PRIVATE CruXml cru_test_base) +target_link_libraries(CruXmlTest PRIVATE CruXml CruTestBase) if (WIN32) add_custom_command(TARGET CruXmlTest POST_BUILD |