mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
vcmi: fix building tests without scripts
This commit is contained in:
parent
276bd5eebf
commit
015f55cd82
@ -30,22 +30,6 @@ set(test_SRCS
|
||||
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
|
||||
erm/ERM_UN.cpp
|
||||
erm/ERMPersistenceTest.cpp
|
||||
erm/ExamplesTest.cpp
|
||||
erm/interpretter/ERM_VR.cpp
|
||||
erm/interpretter/ERM_UN.cpp
|
||||
erm/interpretter/ErmRunner.cpp
|
||||
|
||||
events/ApplyDamageTest.cpp
|
||||
events/EventBusTest.cpp
|
||||
|
||||
@ -58,12 +42,6 @@ set(test_SRCS
|
||||
netpacks/EntitiesChangedTest.cpp
|
||||
netpacks/NetPackFixture.cpp
|
||||
|
||||
scripting/LuaSandboxTest.cpp
|
||||
scripting/LuaSpellEffectTest.cpp
|
||||
scripting/LuaSpellEffectAPITest.cpp
|
||||
scripting/PoolTest.cpp
|
||||
scripting/ScriptFixture.cpp
|
||||
|
||||
spells/AbilityCasterTest.cpp
|
||||
spells/CSpellTest.cpp
|
||||
spells/TargetConditionTest.cpp
|
||||
@ -105,10 +83,7 @@ set(test_HEADERS
|
||||
CVcmiTestConfig.h
|
||||
JsonComparer.h
|
||||
|
||||
scripting/ScriptFixture.h
|
||||
erm/interpretter/ErmRunner.h
|
||||
|
||||
map/MapComparer.h
|
||||
map/MapComparer.h
|
||||
|
||||
netpacks/NetPackFixture.h
|
||||
|
||||
@ -126,6 +101,44 @@ set(test_HEADERS
|
||||
|
||||
)
|
||||
|
||||
if(ENABLE_LUA)
|
||||
list(APPEND test_SRCS
|
||||
scripting/LuaSandboxTest.cpp
|
||||
scripting/LuaSpellEffectTest.cpp
|
||||
scripting/LuaSpellEffectAPITest.cpp
|
||||
scripting/PoolTest.cpp
|
||||
scripting/ScriptFixture.cpp
|
||||
)
|
||||
|
||||
list(APPEND test_HEADERS
|
||||
scripting/ScriptFixture.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ERM)
|
||||
list(APPEND test_SRCS
|
||||
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
|
||||
erm/ERM_UN.cpp
|
||||
erm/ERMPersistenceTest.cpp
|
||||
erm/ExamplesTest.cpp
|
||||
erm/interpretter/ERM_VR.cpp
|
||||
erm/interpretter/ERM_UN.cpp
|
||||
erm/interpretter/ErmRunner.cpp
|
||||
)
|
||||
|
||||
list(APPEND test_HEADERS
|
||||
erm/interpretter/ErmRunner.h
|
||||
)
|
||||
endif()
|
||||
|
||||
assign_source_group(${test_SRCS} ${test_HEADERS})
|
||||
|
||||
set(mock_HEADERS
|
||||
@ -170,16 +183,10 @@ target_include_directories(vcmitest
|
||||
PRIVATE ${GMockSrc}/include
|
||||
)
|
||||
|
||||
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()
|
||||
# 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/")
|
||||
|
||||
|
||||
vcmi_set_output_dir(vcmitest "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user