2012-08-19 19:23:46 +00:00
|
|
|
find_package(GTest REQUIRED)
|
2018-07-08 17:26:57 +00:00
|
|
|
find_package(GMock REQUIRED)
|
2012-08-19 19:23:46 +00:00
|
|
|
|
2018-07-08 17:26:57 +00:00
|
|
|
if (GTEST_FOUND AND GMOCK_FOUND)
|
2017-08-20 19:30:10 +00:00
|
|
|
include_directories(SYSTEM ${GTEST_INCLUDE_DIRS})
|
2018-07-08 17:26:57 +00:00
|
|
|
include_directories(SYSTEM ${GMOCK_INCLUDE_DIRS})
|
2012-08-19 19:23:46 +00:00
|
|
|
|
|
|
|
file(GLOB UNITTEST_SRC_FILES
|
2015-11-13 22:12:07 +00:00
|
|
|
../openmw/mwworld/store.cpp
|
|
|
|
../openmw/mwworld/esmstore.cpp
|
|
|
|
mwworld/test_store.cpp
|
|
|
|
|
2015-11-13 19:27:06 +00:00
|
|
|
mwdialogue/test_keywordsearch.cpp
|
2016-05-07 19:23:53 +00:00
|
|
|
|
|
|
|
esm/test_fixed_string.cpp
|
2017-05-07 21:28:56 +00:00
|
|
|
|
|
|
|
misc/test_stringops.cpp
|
2012-08-19 19:23:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
source_group(apps\\openmw_test_suite FILES openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
|
|
|
|
|
2017-09-08 21:17:42 +00:00
|
|
|
openmw_add_executable(openmw_test_suite openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
|
2012-08-19 19:23:46 +00:00
|
|
|
|
2018-07-08 17:26:57 +00:00
|
|
|
target_link_libraries(openmw_test_suite ${GMOCK_LIBRARIES} components)
|
2012-08-19 21:18:40 +00:00
|
|
|
# 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()
|
2012-08-19 19:23:46 +00:00
|
|
|
endif()
|