summaryrefslogtreecommitdiffstats
path: root/tests/Generating/CMakeLists.txt
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-01 09:30:00 +0200
committerMattes D <github@xoft.cz>2019-09-06 16:12:33 +0200
commita2ffa432b31096f2533ecb50f49ba450b29a2989 (patch)
tree5bdd754cad5e7b49e279ee0e21b9fa15c7c35d7b /tests/Generating/CMakeLists.txt
parentUpdated LibEvent to release 2.1.11-stable. (#4383) (diff)
downloadcuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar
cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.gz
cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.bz2
cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.lz
cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.xz
cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.zst
cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.zip
Diffstat (limited to 'tests/Generating/CMakeLists.txt')
-rw-r--r--tests/Generating/CMakeLists.txt126
1 files changed, 101 insertions, 25 deletions
diff --git a/tests/Generating/CMakeLists.txt b/tests/Generating/CMakeLists.txt
index 31cfc5c24..8c25fd7c3 100644
--- a/tests/Generating/CMakeLists.txt
+++ b/tests/Generating/CMakeLists.txt
@@ -15,19 +15,11 @@ set (SHARED_SRCS
${CMAKE_SOURCE_DIR}/src/StringCompression.cpp
${CMAKE_SOURCE_DIR}/src/StringUtils.cpp
- ${CMAKE_SOURCE_DIR}/src/Bindings/LuaState.cpp
-
- ${CMAKE_SOURCE_DIR}/src/Generating/ChunkDesc.cpp
- ${CMAKE_SOURCE_DIR}/src/Generating/PiecePool.cpp
- ${CMAKE_SOURCE_DIR}/src/Generating/Prefab.cpp
- ${CMAKE_SOURCE_DIR}/src/Generating/PrefabPiecePool.cpp
- ${CMAKE_SOURCE_DIR}/src/Generating/VerticalLimit.cpp
- ${CMAKE_SOURCE_DIR}/src/Generating/VerticalStrategy.cpp
+ ${CMAKE_SOURCE_DIR}/src/Bindings/LuaState.cpp # Needed for PrefabPiecePool loading
${CMAKE_SOURCE_DIR}/src/Noise/Noise.cpp
- ${CMAKE_SOURCE_DIR}/src/OSSupport/CriticalSection.cpp
- ${CMAKE_SOURCE_DIR}/src/OSSupport/Event.cpp
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/CriticalSection.cpp # Needed for LuaState
${CMAKE_SOURCE_DIR}/src/OSSupport/File.cpp
${CMAKE_SOURCE_DIR}/src/OSSupport/GZipFile.cpp
${CMAKE_SOURCE_DIR}/src/OSSupport/StackTrace.cpp
@@ -37,6 +29,38 @@ set (SHARED_SRCS
${CMAKE_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.cpp
)
+set (GENERATING_SRCS
+ ${CMAKE_SOURCE_DIR}/src/Generating/BioGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/Caves.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/ChunkDesc.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/ChunkGenerator.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/CompoGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/CompoGenBiomal.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/ComposableGenerator.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/DistortedHeightmap.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/DungeonRoomsFinisher.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/EndGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/FinishGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/GridStructGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/HeiGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/MineShafts.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/Noise3DGenerator.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/PieceGeneratorBFSTree.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/PiecePool.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/PieceStructuresGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/Prefab.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/PrefabPiecePool.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/PrefabStructure.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/Ravines.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/RoughRavines.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/StructGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/Trees.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/TwoHeights.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/VerticalLimit.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/VerticalStrategy.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/VillageGen.cpp
+)
+
set (SHARED_HDRS
${CMAKE_SOURCE_DIR}/src/BiomeDef.h
${CMAKE_SOURCE_DIR}/src/BlockArea.h
@@ -48,13 +72,6 @@ set (SHARED_HDRS
${CMAKE_SOURCE_DIR}/src/Bindings/LuaState.h
- ${CMAKE_SOURCE_DIR}/src/Generating/ChunkDesc.h
- ${CMAKE_SOURCE_DIR}/src/Generating/PiecePool.h
- ${CMAKE_SOURCE_DIR}/src/Generating/Prefab.h
- ${CMAKE_SOURCE_DIR}/src/Generating/PrefabPiecePool.h
- ${CMAKE_SOURCE_DIR}/src/Generating/VerticalLimit.h
- ${CMAKE_SOURCE_DIR}/src/Generating/VerticalStrategy.h
-
${CMAKE_SOURCE_DIR}/src/Noise/Noise.h
${CMAKE_SOURCE_DIR}/src/OSSupport/CriticalSection.h
@@ -68,6 +85,42 @@ set (SHARED_HDRS
${CMAKE_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.h
)
+set (GENERATING_HDRS
+ ${CMAKE_SOURCE_DIR}/src/Generating/BioGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/Caves.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/ChunkDesc.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/ChunkGenerator.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/CompoGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/CompoGenBiomal.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/ComposableGenerator.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/CompositedHeiGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/DistortedHeightmap.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/DungeonRoomsFinisher.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/EndGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/FinishGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/GridStructGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/HeiGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/IntGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/MineShafts.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/Noise3DGenerator.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/PieceGeneratorBFSTree.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/PiecePool.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/PieceStructuresGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/Prefab.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/PrefabPiecePool.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/PrefabStructure.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/ProtIntGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/Ravines.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/RoughRavines.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/ShapeGen.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/StructGen.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/Trees.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/TwoHeights.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/VerticalLimit.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/VerticalStrategy.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/VillageGen.h
+)
+
set (STUBS
Stubs.cpp
LuaState_Typedefs.inc
@@ -83,9 +136,16 @@ endif()
-add_library(GeneratorTestingSupport STATIC ${SHARED_SRCS} ${SHARED_HDRS} ${STUBS})
+add_library(GeneratorTestingSupport STATIC
+ ${SHARED_SRCS}
+ ${SHARED_HDRS}
+ ${GENERATING_SRCS}
+ ${GENERATING_HDRS}
+ ${STUBS}
+)
target_link_libraries(GeneratorTestingSupport tolualib zlib fmt::fmt)
source_group("Stubs" FILES ${STUBS})
+source_group("Generating" FILES ${GENERATING_HDRS} ${GENERATING_SRCS})
@@ -93,18 +153,32 @@ 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)
+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)
+add_test(
+ NAME LoadablePieces-test
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND LoadablePieces
+)
# PieceRotation test:
-add_executable(PieceRotation PieceRotationTest.cpp)
+add_executable(PieceRotation
+ PieceRotationTest.cpp
+)
target_link_libraries(PieceRotation GeneratorTestingSupport)
-add_test(NAME PieceRotation-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND PieceRotation)
+add_test(
+ NAME PieceRotation-test
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND PieceRotation
+)
@@ -113,11 +187,13 @@ add_test(NAME PieceRotation-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} C
# PieceGeneratorBFSTree test:
add_executable(PieceGeneratorBFSTree
PieceGeneratorBFSTreeTest.cpp
- ${CMAKE_SOURCE_DIR}/src/Generating/PieceGeneratorBFSTree.cpp
- ${CMAKE_SOURCE_DIR}/src/Generating/PieceGeneratorBFSTree.h
)
target_link_libraries(PieceGeneratorBFSTree GeneratorTestingSupport)
-add_test(NAME PieceGeneratorBFSTree-test WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Server/Prefabs/PieceStructures COMMAND PieceGeneratorBFSTree)
+add_test(
+ NAME PieceGeneratorBFSTree-test
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Server/Prefabs/PieceStructures
+ COMMAND PieceGeneratorBFSTree
+)