1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-28 18:18:52 +00:00
OpenMW/apps/openmw_test_suite/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

138 lines
3.5 KiB
CMake
Raw Normal View History

2022-08-03 22:12:29 +00:00
include_directories(SYSTEM ${GTEST_INCLUDE_DIRS})
include_directories(SYSTEM ${GMOCK_INCLUDE_DIRS})
2022-08-03 22:12:29 +00:00
file(GLOB UNITTEST_SRC_FILES
testing_util.hpp
2022-08-03 22:12:29 +00:00
../openmw/mwworld/store.cpp
../openmw/mwworld/esmstore.cpp
../openmw/mwworld/timestamp.cpp
2022-08-03 22:12:29 +00:00
mwworld/test_store.cpp
mwworld/testduration.cpp
mwworld/testtimestamp.cpp
2022-08-03 22:12:29 +00:00
mwdialogue/test_keywordsearch.cpp
2016-05-07 19:23:53 +00:00
2022-08-03 22:12:29 +00:00
mwscript/test_scripts.cpp
2021-10-27 16:30:26 +00:00
2022-08-03 22:12:29 +00:00
esm/test_fixed_string.cpp
esm/variant.cpp
2023-03-03 12:53:50 +00:00
esm/testrefid.cpp
2022-08-03 22:12:29 +00:00
lua/test_lua.cpp
lua/test_scriptscontainer.cpp
lua/test_utilpackage.cpp
lua/test_serialization.cpp
lua/test_configuration.cpp
lua/test_l10n.cpp
lua/test_storage.cpp
2022-10-17 15:53:13 +00:00
lua/test_async.cpp
2022-08-03 22:12:29 +00:00
lua/test_ui_content.cpp
2021-11-18 15:19:54 +00:00
2022-08-03 22:12:29 +00:00
misc/test_stringops.cpp
misc/test_endianness.cpp
misc/test_resourcehelpers.cpp
misc/progressreporter.cpp
misc/compression.cpp
2018-07-08 19:22:34 +00:00
2022-08-03 22:12:29 +00:00
nifloader/testbulletnifloader.cpp
2018-03-13 22:49:08 +00:00
2022-08-03 22:12:29 +00:00
detournavigator/navigator.cpp
detournavigator/settingsutils.cpp
detournavigator/recastmeshbuilder.cpp
detournavigator/gettilespositions.cpp
detournavigator/recastmeshobject.cpp
detournavigator/navmeshtilescache.cpp
detournavigator/tilecachedrecastmeshmanager.cpp
detournavigator/navmeshdb.cpp
detournavigator/serialization.cpp
detournavigator/asyncnavmeshupdater.cpp
2022-08-03 22:12:29 +00:00
serialization/binaryreader.cpp
serialization/binarywriter.cpp
serialization/sizeaccumulator.cpp
serialization/integration.cpp
2019-09-29 15:42:01 +00:00
2022-08-03 22:12:29 +00:00
settings/parser.cpp
settings/shadermanager.cpp
2023-04-23 13:15:33 +00:00
settings/testvalues.cpp
2020-05-01 21:03:13 +00:00
2022-08-03 22:12:29 +00:00
shader/parsedefines.cpp
shader/parsefors.cpp
shader/parselinks.cpp
shader/shadermanager.cpp
2022-08-03 22:12:29 +00:00
../openmw/options.cpp
openmw/options.cpp
2021-10-16 11:03:15 +00:00
2022-08-03 22:12:29 +00:00
sqlite3/db.cpp
sqlite3/request.cpp
sqlite3/statement.cpp
sqlite3/transaction.cpp
2022-08-03 22:12:29 +00:00
esmloader/load.cpp
esmloader/esmdata.cpp
esmloader/record.cpp
2021-11-15 16:40:22 +00:00
2022-08-03 22:12:29 +00:00
files/hash.cpp
files/conversion_tests.cpp
2022-02-13 15:38:49 +00:00
2022-08-03 22:12:29 +00:00
toutf8/toutf8.cpp
2022-02-19 01:49:22 +00:00
2022-08-03 22:12:29 +00:00
esm4/includes.cpp
2022-05-14 01:58:00 +00:00
2022-08-03 22:12:29 +00:00
fx/lexer.cpp
fx/technique.cpp
2022-08-03 22:12:29 +00:00
esm3/readerscache.cpp
esm3/testsaveload.cpp
esm3/testesmwriter.cpp
2022-09-18 13:00:02 +00:00
nifosg/testnifloader.cpp
2022-08-03 22:12:29 +00:00
)
2022-08-03 22:12:29 +00:00
source_group(apps\\openmw_test_suite FILES openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
2022-08-03 22:12:29 +00:00
openmw_add_executable(openmw_test_suite openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
2022-08-03 22:12:29 +00:00
target_link_libraries(openmw_test_suite GTest::GTest GMock::GMock components)
# Fix for not visible pthreads functions for linker with glibc 2.15
if (UNIX AND NOT APPLE)
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})
endif()
2022-08-03 22:12:29 +00:00
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw_test_suite PRIVATE --coverage)
2022-08-03 22:12:29 +00:00
target_link_libraries(openmw_test_suite gcov)
endif()
2022-08-03 22:12:29 +00:00
file(DOWNLOAD
https://gitlab.com/OpenMW/example-suite/-/raw/8966dab24692555eec720c854fb0f73d108070cd/data/template.omwgame
${CMAKE_CURRENT_BINARY_DIR}/data/template.omwgame
EXPECTED_HASH SHA512=6e38642bcf013c5f496a9cb0bf3ec7c9553b6e86b836e7844824c5a05f556c9391167214469b6318401684b702d7569896bf743c85aee4198612b3315ba778d6
)
2022-08-03 22:12:29 +00:00
target_compile_definitions(openmw_test_suite
PRIVATE OPENMW_DATA_DIR=u8"${CMAKE_CURRENT_BINARY_DIR}/data"
2023-04-23 12:46:30 +00:00
OPENMW_PROJECT_SOURCE_DIR=u8"${PROJECT_SOURCE_DIR}")
2022-08-03 22:12:29 +00:00
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND MSVC)
target_precompile_headers(openmw_test_suite PRIVATE
<boost/program_options/options_description.hpp>
2022-08-03 22:12:29 +00:00
<gtest/gtest.h>
2022-08-03 22:12:29 +00:00
<sol/sol.hpp>
2022-08-03 22:12:29 +00:00
<algorithm>
<filesystem>
<fstream>
<functional>
<memory>
<string>
<vector>
)
endif()