summaryrefslogtreecommitdiffstats
path: root/tests/LoadablePieces/CMakeLists.txt
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-06-18 23:30:41 +0200
committerMattes D <github@xoft.cz>2015-06-19 16:15:59 +0200
commit8df31067d4703beb3225b7d9787385d58f893c5d (patch)
treeab6863dece3d5741b8ea1989700f29188a4f8098 /tests/LoadablePieces/CMakeLists.txt
parentPrefabPiecePool: Added loading from cubeset file. (diff)
downloadcuberite-8df31067d4703beb3225b7d9787385d58f893c5d.tar
cuberite-8df31067d4703beb3225b7d9787385d58f893c5d.tar.gz
cuberite-8df31067d4703beb3225b7d9787385d58f893c5d.tar.bz2
cuberite-8df31067d4703beb3225b7d9787385d58f893c5d.tar.lz
cuberite-8df31067d4703beb3225b7d9787385d58f893c5d.tar.xz
cuberite-8df31067d4703beb3225b7d9787385d58f893c5d.tar.zst
cuberite-8df31067d4703beb3225b7d9787385d58f893c5d.zip
Diffstat (limited to '')
-rw-r--r--tests/LoadablePieces/CMakeLists.txt93
1 files changed, 93 insertions, 0 deletions
diff --git a/tests/LoadablePieces/CMakeLists.txt b/tests/LoadablePieces/CMakeLists.txt
new file mode 100644
index 000000000..74429ea9d
--- /dev/null
+++ b/tests/LoadablePieces/CMakeLists.txt
@@ -0,0 +1,93 @@
+cmake_minimum_required (VERSION 2.6)
+
+enable_testing()
+
+include_directories(${CMAKE_SOURCE_DIR}/src/)
+include_directories(${CMAKE_SOURCE_DIR}/lib/)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+add_definitions(-DTEST_GLOBALS=1)
+
+set (SHARED_SRCS
+ ${CMAKE_SOURCE_DIR}/src/BlockArea.cpp
+ ${CMAKE_SOURCE_DIR}/src/Cuboid.cpp
+ ${CMAKE_SOURCE_DIR}/src/ChunkData.cpp
+ ${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/PieceGenerator.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/Prefab.cpp
+ ${CMAKE_SOURCE_DIR}/src/Generating/PrefabPiecePool.cpp
+
+ ${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/File.cpp
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/GZipFile.cpp
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/StackTrace.cpp
+
+ ${CMAKE_SOURCE_DIR}/src/WorldStorage/FastNBT.cpp
+ ${CMAKE_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.cpp
+)
+
+set (SHARED_HDRS
+ ${CMAKE_SOURCE_DIR}/src/BlockArea.h
+ ${CMAKE_SOURCE_DIR}/src/Cuboid.h
+ ${CMAKE_SOURCE_DIR}/src/ChunkData.h
+ ${CMAKE_SOURCE_DIR}/src/Globals.h
+ ${CMAKE_SOURCE_DIR}/src/StringCompression.h
+ ${CMAKE_SOURCE_DIR}/src/StringUtils.h
+
+ ${CMAKE_SOURCE_DIR}/src/Bindings/LuaState.h
+
+ ${CMAKE_SOURCE_DIR}/src/Generating/ChunkDesc.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/PieceGenerator.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/Prefab.h
+ ${CMAKE_SOURCE_DIR}/src/Generating/PrefabPiecePool.h
+
+ ${CMAKE_SOURCE_DIR}/src/Noise/Noise.h
+
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/CriticalSection.h
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/Event.h
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/File.h
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/GZipFile.h
+ ${CMAKE_SOURCE_DIR}/src/OSSupport/StackTrace.h
+
+ ${CMAKE_SOURCE_DIR}/src/WorldStorage/FastNBT.h
+ ${CMAKE_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.h
+)
+
+set (SRCS
+ LoadablePieces.cpp
+ Stubs.cpp
+ LuaState_Typedefs.inc
+ LuaState_Declaration.inc
+ Bindings.h
+)
+
+
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ add_flags_cxx("-Wno-error=conversion -Wno-error=old-style-cast")
+ add_flags_cxx("-Wno-error=global-constructors")
+endif()
+
+
+if (MSVC)
+ # Add the MSVC-specific LeakFinder sources:
+ list (APPEND SHARED_SRCS ${CMAKE_SOURCE_DIR}/src/LeakFinder.cpp ${CMAKE_SOURCE_DIR}/src/StackWalker.cpp)
+ 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(LoadablePieces ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS})
+target_link_libraries(LoadablePieces tolualib zlib)
+add_test(NAME LoadablePieces-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND LoadablePieces)
+
+
+
+