aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2010-10-05 19:24:04 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2010-10-05 19:24:04 +0000
commit7dfbea4976d41421b82c7988017cf1c695104236 (patch)
treeb358e66032854397881d02992071590ca67bbdf5
parentd8e15d9c4a05553daa13dbfeaa1ed4bca899d079 (diff)
downloadgoogletest-7dfbea4976d41421b82c7988017cf1c695104236.tar.gz
googletest-7dfbea4976d41421b82c7988017cf1c695104236.tar.bz2
googletest-7dfbea4976d41421b82c7988017cf1c695104236.zip
Fixes an include order problem in CMakeLists.txt; pulls in gtest r489.
-rw-r--r--CMakeLists.txt24
1 files changed, 10 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 186a710d..061c2fc5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,5 @@
########################################################################
-# Experimental CMake build script for Google Mock.
-#
-# Consider this a prototype. It will change drastically. For now,
-# this is only for people on the cutting edge.
+# CMake build script for Google Mock.
#
# To run the tests for Google Mock itself on Linux, use 'make test' or
# ctest. You can select which tests to run using 'ctest -R regex'.
@@ -12,7 +9,7 @@
# make it prominent in the GUI.
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
-# Forses BUILD_SHARED_LIBS to OFF as Google Mock currently does not support
+# Forces BUILD_SHARED_LIBS to OFF as Google Mock currently does not support
# working in a DLL.
# TODO(vladl@google.com): Implement building gMock as a DLL.
set(BUILD_SHARED_LIBS OFF)
@@ -26,6 +23,7 @@ else()
set(gtest_dir ../gtest)
endif()
+# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
include("${gtest_dir}/cmake/hermetic_build.cmake" OPTIONAL)
if (COMMAND pre_project_set_up_hermetic_build)
@@ -51,19 +49,17 @@ if (COMMAND set_up_hermetic_build)
set_up_hermetic_build()
endif()
-# Defines functions and variables used by Google Mock.
-include("${gtest_dir}/cmake/internal_utils.cmake")
-
-# Google Test also calls this function from add_subdirectory,
-# although its changes will not affect things at the current scope.
-fix_default_settings() # Defined in internal_utils.cmake.
-
# Instructs CMake to process Google Test's CMakeLists.txt and add its
# targets to the current scope. We are placing Google Test's binary
-# directory in a subdirectory of our own as VC compilation may break if they
-# are the same (the default).
+# directory in a subdirectory of our own as VC compilation may break
+# if they are the same (the default).
add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest")
+# Although Google Test's CMakeLists.txt calls this function, the
+# changes there don't affect the current scope. Therefore we have to
+# call it again here.
+config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake
+
# Adds Google Mock's and Google Test's header directories to the search path.
include_directories("${gmock_SOURCE_DIR}/include"
"${gmock_SOURCE_DIR}"