Loading gmock/gtest Projects
CMake Error at googletest/cmake/internal_utils.cmake:149 (add_library):
add_library cannot create target "gtest" because another target with the
same name already exists. The existing target is a static library created
in source directory "D:/Projects/trunk4/googletest". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
googletest/cmake/internal_utils.cmake:172 (cxx_library_with_type)
googletest/CMakeLists.txt:90 (cxx_library)
CMake Error at googletest/cmake/internal_utils.cmake:149 (add_library):
add_library cannot create target "gtest_main" because another target with
the same name already exists. The existing target is a static library
created in source directory "D:/Projects/trunk4/googletest". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
googletest/cmake/internal_utils.cmake:172 (cxx_library_with_type)
googletest/CMakeLists.txt:91 (cxx_library)
CMake Error at googletest/CMakeLists.txt:92 (target_link_libraries):
Attempt to add link library "gtest" to target "gtest_main" which is not
built in this directory.
CMake Error at googletest/CMakeLists.txt:105 (install):
install TARGETS given target "gtest" which does not exist in this
directory.
The READEME.md in the new googlemock has a line "You must use the bundled version of Google Test when using Google Mock," which made sense in 1.6. The error messages above would make sense if I'm grabbing a standalone version of gtest. Is there a version of 1.8 (or 1.7) that has the bundled version of gtest together with gmock in the same directory tree, or is the version in the separate directory that I get from the tar file what I should be using (in which case, that line may need editing)?
I haven't tried to build the new googlemock/googletest standalone yet under CMake, which will be one of the next things I try. But ultimately, we need both of them building as static libraries with the rest of our CMake-driven system, so I want to check if I grabbed the wrong thing before I get too far into troubleshooting the CMake files included in the distribution.
Dave W.