2018-04-15 13:02:31 +02:00
|
|
|
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0")
|
|
|
|
include(GoogleTest)
|
|
|
|
endif()
|
2017-07-09 18:31:21 +02:00
|
|
|
|
|
|
|
set(googleTest_Dir ${CMAKE_CURRENT_SOURCE_DIR}/googletest)
|
2017-08-15 20:17:00 +02:00
|
|
|
if(EXISTS ${googleTest_Dir})
|
2017-08-12 20:58:09 +02:00
|
|
|
set(GTestSrc ${googleTest_Dir}/googletest)
|
|
|
|
set(GMockSrc ${googleTest_Dir}/googlemock)
|
2017-08-15 20:17:00 +02:00
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "No googletest src dir found!")
|
|
|
|
endif()
|
2013-04-22 17:49:28 +03:00
|
|
|
|
|
|
|
set(test_SRCS
|
2017-07-04 13:29:50 +02:00
|
|
|
StdInc.cpp
|
|
|
|
main.cpp
|
|
|
|
CMemoryBufferTest.cpp
|
|
|
|
CVcmiTestConfig.cpp
|
2018-03-05 20:26:00 +02:00
|
|
|
JsonComparer.cpp
|
2017-07-20 06:08:49 +02:00
|
|
|
|
2017-07-04 13:29:50 +02:00
|
|
|
battle/BattleHexTest.cpp
|
2017-07-20 06:08:49 +02:00
|
|
|
battle/CBattleInfoCallbackTest.cpp
|
2017-07-04 13:29:50 +02:00
|
|
|
battle/CHealthTest.cpp
|
2017-07-20 06:08:49 +02:00
|
|
|
battle/CUnitStateTest.cpp
|
|
|
|
battle/CUnitStateMagicTest.cpp
|
|
|
|
battle/battle_UnitTest.cpp
|
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
entity/CArtifactTest.cpp
|
|
|
|
entity/CCreatureTest.cpp
|
|
|
|
entity/CFactionTest.cpp
|
|
|
|
entity/CHeroClassTest.cpp
|
|
|
|
entity/CHeroTest.cpp
|
|
|
|
entity/CSkillTest.cpp
|
|
|
|
|
|
|
|
erm/ERM_BM.cpp
|
|
|
|
erm/ERM_BU.cpp
|
|
|
|
erm/ERM_FU.cpp
|
|
|
|
erm/ERM_GM_T.cpp
|
|
|
|
erm/ERM_MA.cpp
|
|
|
|
erm/ERM_MC.cpp
|
|
|
|
erm/ERM_MF.cpp
|
|
|
|
erm/ERM_TM_T.cpp
|
|
|
|
erm/ERM_VR.cpp
|
2021-09-05 14:23:36 +02:00
|
|
|
erm/ERM_UN.cpp
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
erm/ERMPersistenceTest.cpp
|
|
|
|
erm/ExamplesTest.cpp
|
2021-03-27 14:47:44 +02:00
|
|
|
erm/interpretter/ERM_VR.cpp
|
2021-09-05 14:23:36 +02:00
|
|
|
erm/interpretter/ERM_UN.cpp
|
2021-03-27 14:47:44 +02:00
|
|
|
erm/interpretter/ErmRunner.cpp
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
|
|
|
|
events/ApplyDamageTest.cpp
|
|
|
|
events/EventBusTest.cpp
|
|
|
|
|
|
|
|
game/CGameStateTest.cpp
|
|
|
|
|
|
|
|
map/CMapEditManagerTest.cpp
|
|
|
|
map/CMapFormatTest.cpp
|
|
|
|
map/MapComparer.cpp
|
|
|
|
|
|
|
|
netpacks/EntitiesChangedTest.cpp
|
|
|
|
netpacks/NetPackFixture.cpp
|
|
|
|
|
|
|
|
scripting/LuaSandboxTest.cpp
|
|
|
|
scripting/LuaSpellEffectTest.cpp
|
|
|
|
scripting/LuaSpellEffectAPITest.cpp
|
|
|
|
scripting/PoolTest.cpp
|
|
|
|
scripting/ScriptFixture.cpp
|
2017-07-20 06:08:49 +02:00
|
|
|
|
2018-03-02 12:22:51 +02:00
|
|
|
spells/AbilityCasterTest.cpp
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
spells/CSpellTest.cpp
|
2017-07-20 06:08:49 +02:00
|
|
|
spells/TargetConditionTest.cpp
|
|
|
|
|
|
|
|
spells/effects/EffectFixture.cpp
|
|
|
|
spells/effects/CatapultTest.cpp
|
|
|
|
spells/effects/CloneTest.cpp
|
|
|
|
spells/effects/DamageTest.cpp
|
|
|
|
spells/effects/DispelTest.cpp
|
|
|
|
spells/effects/HealTest.cpp
|
|
|
|
spells/effects/SacrificeTest.cpp
|
|
|
|
spells/effects/SummonTest.cpp
|
|
|
|
spells/effects/TeleportTest.cpp
|
|
|
|
spells/effects/TimedTest.cpp
|
|
|
|
|
|
|
|
spells/targetConditions/AbsoluteSpellConditionTest.cpp
|
|
|
|
spells/targetConditions/AbsoluteLevelConditionTest.cpp
|
|
|
|
spells/targetConditions/BonusConditionTest.cpp
|
|
|
|
spells/targetConditions/CreatureConditionTest.cpp
|
|
|
|
spells/targetConditions/ElementalConditionTest.cpp
|
|
|
|
spells/targetConditions/HealthValueConditionTest.cpp
|
|
|
|
spells/targetConditions/ImmunityNegationConditionTest.cpp
|
|
|
|
spells/targetConditions/NormalLevelConditionTest.cpp
|
|
|
|
spells/targetConditions/NormalSpellConditionTest.cpp
|
|
|
|
spells/targetConditions/ReceptiveFeatureConditionTest.cpp
|
|
|
|
spells/targetConditions/SpellEffectConditionTest.cpp
|
|
|
|
spells/targetConditions/TargetConditionItemFixture.cpp
|
2021-07-15 23:32:13 +02:00
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
mock/BattleFake.cpp
|
2017-07-20 06:08:49 +02:00
|
|
|
mock/mock_IGameCallback.cpp
|
|
|
|
mock/mock_MapService.cpp
|
|
|
|
mock/mock_BonusBearer.cpp
|
2018-07-27 06:44:10 +02:00
|
|
|
mock/mock_CPSICallback.cpp
|
2017-06-29 01:03:37 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(test_HEADERS
|
2017-07-04 13:29:50 +02:00
|
|
|
StdInc.h
|
2017-07-20 06:08:49 +02:00
|
|
|
|
2017-07-04 13:29:50 +02:00
|
|
|
CVcmiTestConfig.h
|
2018-03-05 20:26:00 +02:00
|
|
|
JsonComparer.h
|
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
scripting/ScriptFixture.h
|
2021-03-27 14:47:44 +02:00
|
|
|
erm/interpretter/ErmRunner.h
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
|
2017-07-04 13:29:50 +02:00
|
|
|
map/MapComparer.h
|
2017-07-20 06:08:49 +02:00
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
netpacks/NetPackFixture.h
|
|
|
|
|
2017-07-20 06:08:49 +02:00
|
|
|
spells/effects/EffectFixture.h
|
|
|
|
|
|
|
|
spells/targetConditions/TargetConditionItemFixture.h
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
|
2018-07-27 06:44:10 +02:00
|
|
|
vcai/ResourceManagerTest.h
|
2017-07-20 06:08:49 +02:00
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
mock/BattleFake.h
|
2017-07-20 06:08:49 +02:00
|
|
|
mock/mock_BonusBearer.h
|
|
|
|
mock/mock_IGameCallback.h
|
|
|
|
mock/mock_MapService.h
|
|
|
|
mock/mock_BonusBearer.h
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
|
2013-04-22 17:49:28 +03:00
|
|
|
)
|
|
|
|
|
2017-08-15 20:17:00 +02:00
|
|
|
assign_source_group(${test_SRCS} ${test_HEADERS})
|
|
|
|
|
2017-07-18 21:04:57 +02:00
|
|
|
set(mock_HEADERS
|
2017-07-20 06:08:49 +02:00
|
|
|
mock/mock_battle_IBattleState.h
|
|
|
|
mock/mock_battle_Unit.h
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
mock/mock_Creature.h
|
|
|
|
mock/mock_CreatureService.h
|
|
|
|
mock/mock_IBattleInfoCallback.h
|
|
|
|
mock/mock_scripting_Context.h
|
|
|
|
mock/mock_scripting_Script.h
|
|
|
|
mock/mock_scripting_Service.h
|
2017-07-20 06:08:49 +02:00
|
|
|
mock/mock_spells_Mechanics.h
|
|
|
|
mock/mock_spells_Problem.h
|
|
|
|
mock/mock_spells_Spell.h
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
mock/mock_UnitEnvironment.h
|
|
|
|
mock/mock_UnitInfo.h
|
2017-07-20 06:08:49 +02:00
|
|
|
mock/mock_vstd_RNG.h
|
2018-07-27 06:44:10 +02:00
|
|
|
mock/mock_CPSICallback.h
|
2017-07-18 21:04:57 +02:00
|
|
|
)
|
2017-08-15 20:17:00 +02:00
|
|
|
|
2022-06-11 17:45:34 +02:00
|
|
|
if(MSVC)
|
|
|
|
set(gtest_force_shared_crt ON CACHE BOOL "Use shared (DLL) run-time lib even when Google Test is built as static lib." FORCE)
|
|
|
|
endif()
|
2017-08-07 18:43:32 +02:00
|
|
|
add_subdirectory_with_folder("3rdparty" googletest EXCLUDE_FROM_ALL)
|
2017-07-09 18:31:21 +02:00
|
|
|
|
2019-03-20 21:58:15 +02:00
|
|
|
add_executable(vcmitest ${test_SRCS} ${test_HEADERS} ${mock_HEADERS})
|
2021-07-05 19:04:17 +02:00
|
|
|
target_link_libraries(vcmitest PRIVATE gtest gmock vcmi ${SYSTEM_LIBS})
|
2018-04-15 13:02:31 +02:00
|
|
|
|
2019-03-20 21:58:15 +02:00
|
|
|
target_include_directories(vcmitest
|
2019-01-19 01:57:54 +02:00
|
|
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
PRIVATE ${GTestSrc}
|
|
|
|
PRIVATE ${GTestSrc}/include
|
|
|
|
PRIVATE ${GMockSrc}
|
|
|
|
PRIVATE ${GMockSrc}/include
|
|
|
|
)
|
|
|
|
|
2018-04-15 13:02:31 +02:00
|
|
|
if(FALSE AND NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0")
|
|
|
|
# Running tests one by one using ctest not recommended due to vcmi having
|
|
|
|
# slow global initialization.
|
|
|
|
gtest_discover_tests(vcmitest
|
|
|
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/bin/")
|
|
|
|
else()
|
|
|
|
add_test(NAME tests
|
|
|
|
COMMAND vcmitest
|
|
|
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/bin/")
|
|
|
|
endif()
|
|
|
|
|
2013-04-22 17:49:28 +03:00
|
|
|
|
2017-07-04 22:46:49 +02:00
|
|
|
vcmi_set_output_dir(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
|
|
|
|
2018-04-15 13:02:31 +02:00
|
|
|
file (GLOB_RECURSE testdata "testdata/*.*")
|
|
|
|
foreach(resource ${testdata})
|
|
|
|
get_filename_component(filename ${resource} NAME)
|
|
|
|
get_filename_component(dir ${resource} DIRECTORY)
|
|
|
|
get_filename_component(dirname ${dir} NAME)
|
|
|
|
set (output "")
|
|
|
|
while(NOT ${dirname} STREQUAL testdata)
|
|
|
|
get_filename_component(path_component ${dir} NAME)
|
|
|
|
set (output "${path_component}/${output}")
|
|
|
|
get_filename_component(dir ${dir} DIRECTORY)
|
|
|
|
get_filename_component(dirname ${dir} NAME)
|
|
|
|
endwhile()
|
|
|
|
set(output "${CMAKE_BINARY_DIR}/bin/test/testdata/${output}/${filename}")
|
|
|
|
configure_file(${resource} ${output} COPYONLY)
|
2013-04-22 17:49:28 +03:00
|
|
|
endforeach()
|