Skip to content

Commit

Permalink
Merge pull request #11841 from daschuer/gtest
Browse files Browse the repository at this point in the history
de-vendor GTest
  • Loading branch information
JoergAtGithub authored Aug 25, 2023
2 parents 75833c0 + 8fdbd5b commit aa4b9d5
Show file tree
Hide file tree
Showing 81 changed files with 23 additions and 41,581 deletions.
25 changes: 2 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1809,23 +1809,6 @@ endif()
# Tests
#

# CMake + googletest: https://crascit.com/2015/07/25/cmake-gtest/

# Prevent GoogleTest from overriding our compiler/linker options
# when building with Visual Studio
set(gtest_force_shared_crt ON CACHE BOOL "Pass Mixxx compiler/linker options to GoogleTest" FORCE)

# Prevent installation of GoogleTest libraries
set(INSTALL_GTEST OFF CACHE BOOL "Disable installation of GoogleTest" FORCE)

# Add googletest directly to our build. This adds the following targets:
# gtest, gtest_main, gmock and gmock_main
message(STATUS "Adding goolgletest targets gtest, gtest_main, gmock and gmock_main")
add_subdirectory(
"${CMAKE_CURRENT_SOURCE_DIR}/lib/googletest"
"${CMAKE_CURRENT_BINARY_DIR}/lib/googletest"
)

add_executable(mixxx-test
src/test/analyserwaveformtest.cpp
src/test/analyzersilence_test.cpp
Expand Down Expand Up @@ -1937,8 +1920,9 @@ add_executable(mixxx-test
src/test/wwidgetstack_test.cpp
src/util/moc_included_test.cpp
)
find_package(GTest CONFIG REQUIRED)
set_target_properties(mixxx-test PROPERTIES AUTOMOC ON)
target_link_libraries(mixxx-test PRIVATE mixxx-lib mixxx-gitinfostore gtest gmock)
target_link_libraries(mixxx-test PRIVATE mixxx-lib mixxx-gitinfostore GTest::gtest GTest::gmock)

#
# Benchmark tests
Expand Down Expand Up @@ -2324,11 +2308,6 @@ elseif(GNU_GCC OR LLVM_CLANG)
endif()
target_link_libraries(mixxx-lib PRIVATE FpClassify)

# googletest
# Required to use the macro FRIEND_TEST from <gtest/gtest_prod.h>
# in production code
target_include_directories(mixxx-lib SYSTEM PUBLIC "${gtest_SOURCE_DIR}/include")

# LAME
find_package(mp3lame REQUIRED)
target_link_libraries(mixxx-lib PRIVATE mp3lame::mp3lame)
Expand Down
34 changes: 0 additions & 34 deletions lib/googletest/CMakeLists.txt

This file was deleted.

131 changes: 0 additions & 131 deletions lib/googletest/CONTRIBUTING.md

This file was deleted.

65 changes: 0 additions & 65 deletions lib/googletest/CONTRIBUTORS

This file was deleted.

28 changes: 0 additions & 28 deletions lib/googletest/LICENSE

This file was deleted.

Loading

0 comments on commit aa4b9d5

Please sign in to comment.