summaryrefslogtreecommitdiffstats
path: root/tests/Generating/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/Generating/CMakeLists.txt (renamed from tests/PieceRotation/CMakeLists.txt)33
1 files changed, 26 insertions, 7 deletions
diff --git a/tests/PieceRotation/CMakeLists.txt b/tests/Generating/CMakeLists.txt
index bb1b37a53..4efb9dbe2 100644
--- a/tests/PieceRotation/CMakeLists.txt
+++ b/tests/Generating/CMakeLists.txt
@@ -65,8 +65,7 @@ set (SHARED_HDRS
${CMAKE_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.h
)
-set (SRCS
- PieceRotationTest.cpp
+set (STUBS
Stubs.cpp
LuaState_Typedefs.inc
LuaState_Declaration.inc
@@ -86,17 +85,37 @@ if (MSVC)
list (APPEND SHARED_HDRS ${CMAKE_SOURCE_DIR}/src/LeakFinder.h ${CMAKE_SOURCE_DIR}/src/StackWalker.h)
endif()
-source_group("Shared" FILES ${SHARED_SRCS} ${SHARED_HDRS})
-source_group("Sources" FILES ${SRCS})
-add_executable(PieceRotation ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS})
-target_link_libraries(PieceRotation tolualib zlib)
+add_library(GeneratorTestingSupport STATIC ${SHARED_SRCS} ${SHARED_HDRS} ${STUBS})
+target_link_libraries(GeneratorTestingSupport tolualib zlib)
+source_group("Stubs" FILES ${STUBS})
+
+
+
+
+
+# LoadablePieces test:
+source_group("Data files" FILES Test.cubeset Test1.schematic)
+add_executable(LoadablePieces LoadablePieces.cpp Test.cubeset Test1.schematic)
+target_link_libraries(LoadablePieces GeneratorTestingSupport)
+add_test(NAME LoadablePieces-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND LoadablePieces)
+
+
+
+
+
+# PieceRotation test:
+add_executable(PieceRotation PieceRotationTest.cpp)
+target_link_libraries(PieceRotation GeneratorTestingSupport)
add_test(NAME PieceRotation-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND PieceRotation)
+
# Put the projects into solution folders (MSVC):
set_target_properties(
+ GeneratorTestingSupport
+ LoadablePieces
PieceRotation
- PROPERTIES FOLDER Tests
+ PROPERTIES FOLDER Tests/Generating
)