From 38b9b9be4c9edb44eea9974ecccc787f96cc845a Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Wed, 8 Dec 2021 19:15:16 +0100 Subject: [PATCH 1/3] Update data, gtest and add options to .gitmodules Update the `data` and `lib/googletest` submodules. `git submodule update --remote` command should now update the data submodule by rebasing on the remote branch named the same as the current branch. Changes in the `lib/googletest` submodule should now be ignored in `git status`. --- .gitmodules | 3 +++ data | 2 +- lib/googletest | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index f4a19857..0b5b4004 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,9 @@ [submodule "data"] path = data url = git://github.com/colobot/colobot-data.git + branch = . + update = rebase [submodule "lib/googletest"] path = lib/googletest url = git://github.com/google/googletest.git + ignore = all diff --git a/data b/data index 21a45c0b..5d658744 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 21a45c0b8809accd142a83a81f1a3c92a327f319 +Subproject commit 5d658744641064e56cf489453dbf726964b2b98d diff --git a/lib/googletest b/lib/googletest index 703bd9ca..e2239ee6 160000 --- a/lib/googletest +++ b/lib/googletest @@ -1 +1 @@ -Subproject commit 703bd9caab50b139428cea1aaff9974ebee5742e +Subproject commit e2239ee6043f73722e7aa812a459f54a28552929 From f9c275919e410359b526b27d32ebe5ca66f144ab Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Wed, 8 Dec 2021 19:25:36 +0100 Subject: [PATCH 2/3] Fix CMake warning about empty GoogleTest version The warning appeared when GoogleTest is used as a submodule. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4dd5808..96b534a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -439,11 +439,12 @@ endif() if(TESTS) # Google Test library - find_package(GTest 1.10.0 QUIET) + find_package(GTest 1.11.0 QUIET) if(NOT(FORCE_BUNDLED_GTEST) AND GTEST_FOUND) message(STATUS "Using system gtest library in ${GTEST_BOTH_LIBRARIES}") elseif(EXISTS "${colobot_SOURCE_DIR}/lib/googletest/googletest/CMakeLists.txt") message(STATUS "Using gtest git submodule") + set(GOOGLETEST_VERSION "1.11.0") add_subdirectory("${colobot_SOURCE_DIR}/lib/googletest/googletest" "lib/googletest/googletest") # Add aliases so target names are compatible with the find_package above add_library(GTest::GTest ALIAS gtest) From ea7837b4c6fbcb3827a19208b95f3dda698541a6 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Wed, 8 Dec 2021 19:35:30 +0100 Subject: [PATCH 3/3] Remove usage of a CMake 3.17 feature We currently use CMake 3.16 for compatibility with Ubuntu 18.04 LTS. The `NAME_MISMATCHED` argument which turns off a CMake warning when using `FIND_PACKAGE_HANDLE_STANDARD_ARGS`, is not available in CMake 3.16 and can prevent a successful build. See https://github.com/colobot/colobot/pull/1478#issuecomment-986204233 --- cmake/FindSDL2.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake index cd73f293..2445d36e 100644 --- a/cmake/FindSDL2.cmake +++ b/cmake/FindSDL2.cmake @@ -317,8 +317,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 if(SDL2MAIN_LIBRARY) FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2main REQUIRED_VARS SDL2MAIN_LIBRARY SDL2_INCLUDE_DIR - VERSION_VAR SDL2_VERSION_STRING - NAME_MISMATCHED) + VERSION_VAR SDL2_VERSION_STRING) endif()