gnucash master: Yet another tweak to properly find GMOCK sources
Geert Janssens
gjanssens at code.gnucash.org
Mon Feb 20 12:09:15 EST 2017
Updated via https://github.com/Gnucash/gnucash/commit/01d31c71 (commit)
from https://github.com/Gnucash/gnucash/commit/81da2f24 (commit)
commit 01d31c7171998017ff8604330ae216f1877cf130
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Feb 20 17:17:54 2017 +0100
Yet another tweak to properly find GMOCK sources
The previous logic failed because GMOCK_SRC_DIR is cached. On
subsequent cmake runs FIND_PATH is not invoked again and hence
the first test for GMOCK_SRC_DIR will always succeed and
src is always appended to it to obtain GMOCK_SRC_MAIN_DIR.
This is not what we want, so I have chosen to force a rerun
of FIND_PATH by clearing the cached value of GMOCK_SRC_DIR.
diff --git a/src/cmake_modules/GncAddTest.cmake b/src/cmake_modules/GncAddTest.cmake
index 1a9d7a7..2f752b0 100644
--- a/src/cmake_modules/GncAddTest.cmake
+++ b/src/cmake_modules/GncAddTest.cmake
@@ -116,6 +116,7 @@ FUNCTION(GNC_GTEST_CONFIGURE)
MESSAGE(STATUS "Checking for GMOCK")
FIND_PATH(GMOCK_INCLUDE_DIR gmock/gmock.h
PATHS ${GMOCK_ROOT}/include /usr/include)
+ unset(GMOCK_SRC_DIR CACHE)
FIND_PATH(GMOCK_SRC_DIR src/gmock-all.cc
PATHS ${GMOCK_ROOT} /usr/src/gmock)
if (GMOCK_SRC_DIR)
Summary of changes:
src/cmake_modules/GncAddTest.cmake | 1 +
1 file changed, 1 insertion(+)
More information about the gnucash-changes
mailing list