2013-04-22 17:49:28 +03:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
|
|
|
enable_testing()
|
2016-08-12 08:38:26 +02:00
|
|
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/test)
|
2013-04-22 17:49:28 +03:00
|
|
|
include_directories(${Boost_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
set(test_SRCS
|
|
|
|
StdInc.cpp
|
|
|
|
CVcmiTestConfig.cpp
|
|
|
|
CMapEditManagerTest.cpp
|
2015-08-08 18:16:33 +02:00
|
|
|
MapComparer.cpp
|
|
|
|
CMapFormatTest.cpp
|
2013-04-22 17:49:28 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(vcmitest ${test_SRCS})
|
2013-07-07 22:44:08 +03:00
|
|
|
target_link_libraries(vcmitest vcmi ${Boost_LIBRARIES} ${RT_LIB} ${DL_LIB})
|
2013-04-22 17:49:28 +03:00
|
|
|
add_test(vcmitest vcmitest)
|
|
|
|
|
2014-02-05 23:25:36 +03:00
|
|
|
set_target_properties(vcmitest PROPERTIES ${PCH_PROPERTIES})
|
|
|
|
cotire(vcmitest)
|
2014-02-01 16:37:26 +03:00
|
|
|
|
2013-04-25 19:09:48 +03:00
|
|
|
# Files to copy to the build directory
|
|
|
|
add_custom_target(vcmitestFiles ALL)
|
2013-04-22 17:49:28 +03:00
|
|
|
set(vcmitest_FILES
|
|
|
|
TerrainViewTest.h3m
|
|
|
|
terrainViewMappings.json
|
|
|
|
)
|
|
|
|
|
|
|
|
foreach(file ${vcmitest_FILES})
|
2013-04-25 19:09:48 +03:00
|
|
|
add_custom_command(TARGET vcmitestFiles POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/${file}" ${CMAKE_CURRENT_BINARY_DIR}
|
2013-04-22 17:49:28 +03:00
|
|
|
)
|
|
|
|
endforeach()
|