From a3b5e3e7edcef3c875eb804f0a25bb015aaa1c50 Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Wed, 17 Nov 2021 04:14:18 -0600 Subject: [PATCH] Make it possible to run tests. (#2553) I followed the instructions on https://github.com/polybar/polybar/wiki/Testing, and this happened to me: $ cmake .. -DBUILD_TESTS=ON ... [ 11%] Creating directories for 'googletest' [ 22%] Performing download step (git clone) for 'googletest' Cloning into 'googletest-src'... fatal: invalid reference: master CMake Error at googletest-download/googletest-prefix/tmp/googletest-gitclone.cmake:40 (message): Failed to checkout tag: 'master' make[2]: *** [CMakeFiles/googletest.dir/build.make:99: googletest-prefix/src/googletest-stamp/googletest-download] Error 1 make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/googletest.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 CMake Error at tests/CMakeLists.txt:19 (message): Build step for googletest failed: 2 It looks like the problem is that [googletest](https://github.com/google/googletest/) changed their branch from `master` to `main` at some point. I also fixed a broken link https://github.com/polybar/polybar/wiki/Testing. Hopefully it's intentional that random members of the public such as myself are allowed to do that? --- tests/CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt.in b/tests/CMakeLists.txt.in index f67c8be0..5eeeae80 100644 --- a/tests/CMakeLists.txt.in +++ b/tests/CMakeLists.txt.in @@ -5,7 +5,7 @@ project(googletest-download NONE) include(ExternalProject) ExternalProject_Add(googletest GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG master + GIT_TAG main SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src" BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build" CONFIGURE_COMMAND ""