Skip to content

Commit

Permalink
Move gtest to submodules (cc: #1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Aug 25, 2020
1 parent 5d06b3e commit f2378c5
Show file tree
Hide file tree
Showing 42 changed files with 36 additions and 27,512 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "3rdparty/libfreenect"]
path = 3rdparty/libfreenect
url = https://github.com/OpenKinect/libfreenect.git
[submodule "3rdparty/googletest"]
path = 3rdparty/googletest
url = https://github.com/google/googletest.git
31 changes: 31 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,34 @@ endif()
# libfyaml
# ----------------------------------
# already handled in cmakemodules/script_libfyaml.cmake


# ----------------------------------
# googletest
# ----------------------------------
if (NOT CMAKE_MRPT_HAS_GTEST_SYSTEM)
add_library(mrptgtest
STATIC
${MRPT_SOURCE_DIR}/3rdparty/googletest/googletest/src/gtest-all.cc
)

target_include_directories(mrptgtest PRIVATE
${MRPT_SOURCE_DIR}/3rdparty/googletest/googletest/src/
${MRPT_SOURCE_DIR}/3rdparty/googletest/googletest/
)
target_include_directories(mrptgtest PUBLIC
${MRPT_SOURCE_DIR}/3rdparty/googletest/googletest/include/
)

mrpt_lib_target_requires_cpp17(mrptgtest)

if (UNIX AND MRPT_COMPILER_IS_GCC_OR_CLANG)
target_compile_options(mrptgtest PRIVATE "-fPIC")
endif()
# Fix a "bug" in VS11 (MSVC 2012):
if(MSVC)
target_compile_definitions(_VARIADIC_MAX=10)
endif()

set_target_properties(mrptgtest PROPERTIES FOLDER "3rd party")
endif()
1 change: 1 addition & 0 deletions 3rdparty/googletest
Submodule googletest added at 703bd9
31 changes: 0 additions & 31 deletions 3rdparty/gtest-1.10.0/CMakeLists.txt

This file was deleted.

37 changes: 0 additions & 37 deletions 3rdparty/gtest-1.10.0/CONTRIBUTORS

This file was deleted.

280 changes: 0 additions & 280 deletions 3rdparty/gtest-1.10.0/README.md

This file was deleted.

Loading

0 comments on commit f2378c5

Please sign in to comment.