Permalink
Browse files

Fix problem installing gtest when gmock enabled

Fix a bug deciding whether to enable the option to install Google Test
caused by one of the dependent option dependencies not being defined
yet.

Fixes #1198; impossible to install Google Test if Google Mock is built.
  • Loading branch information...
mwoehlke-kitware committed Aug 16, 2017
1 parent 5ed471c commit 9469fb687d040b60c8749b7617fee4e77c7f6409
Showing with 2 additions and 1 deletion.
  1. +2 −1 CMakeLists.txt
View
@@ -19,10 +19,11 @@ else()
endif()
option(BUILD_GTEST "Builds the googletest subproject" OFF)
cmake_dependent_option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON "BUILD_GTEST OR BUILD_GMOCK" OFF)
#Note that googlemock target already builds googletest
option(BUILD_GMOCK "Builds the googlemock subproject" ON)
cmake_dependent_option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON "BUILD_GTEST OR BUILD_GMOCK" OFF)
cmake_dependent_option(INSTALL_GMOCK "Enable installation of googlemock. (Projects embedding googlemock may want to turn this OFF.)" ON "BUILD_GMOCK" OFF)
if(BUILD_GMOCK)

0 comments on commit 9469fb6

Please sign in to comment.