1
0
cuberite-2a/tests/ChunkData/CMakeLists.txt

36 lines
1.3 KiB
CMake
Raw Normal View History

2014-04-27 15:25:03 -04:00
cmake_minimum_required (VERSION 2.6)
enable_testing()
include_directories(${CMAKE_SOURCE_DIR}/src/)
2015-05-19 14:53:16 -04:00
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
2015-05-24 09:16:05 -04:00
add_flags_cxx("-Wno-error=old-style-cast")
2015-05-19 14:53:16 -04:00
set_source_files_properties(${CMAKE_SOURCE_DIR}/src/ChunkData.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=sign-conversion")
set_source_files_properties(${CMAKE_SOURCE_DIR}/src/StringUtils.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=conversion")
endif()
2014-05-24 09:09:51 -04:00
add_definitions(-DTEST_GLOBALS=1)
add_library(ChunkBuffer ${CMAKE_SOURCE_DIR}/src/ChunkData.cpp ${CMAKE_SOURCE_DIR}/src/StringUtils.cpp)
2014-04-27 15:25:03 -04:00
add_executable(creatable-exe creatable.cpp)
target_link_libraries(creatable-exe ChunkBuffer)
add_test(NAME creatable-test COMMAND creatable-exe)
add_executable(coordinates-exe Coordinates.cpp)
target_link_libraries(coordinates-exe ChunkBuffer)
add_test(NAME coordinates-test COMMAND coordinates-exe)
2014-05-10 11:08:08 -04:00
add_executable(copies-exe Copies.cpp)
target_link_libraries(copies-exe ChunkBuffer)
add_test(NAME copies-test COMMAND copies-exe)
add_executable(arraystocoords-exe ArraytoCoord.cpp)
target_link_libraries(arraystocoords-exe ChunkBuffer)
add_test(NAME arraystocoords-test COMMAND arraystocoords-exe)
add_executable(copyblocks-exe CopyBlocks.cpp)
target_link_libraries(copyblocks-exe ChunkBuffer)
add_test(NAME copyblocks-test COMMAND copyblocks-exe)