I am in the process of moving an existing C++ build system to CMake and I have a question regarding External Project dependencies.
The scenario is that we have two projects A and B.
Project A pulls in googletest as an external project with the below command:
ExternalProject_Add(gtest
GIT_REPOSITORY git@github.com:google/googletest.git
GIT_TAG "release-1.8.1"
SOURCE_DIR "${CMAKE_BINARY_DIR}/gtest-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/gtest-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
Note that project A depends on release-1.8.1
of googletest.
Now, project B pulls in googletest with the same command but depends on release-1.7.0
(different than the dependency of project A) AND project B also pulls in project A as another External Project.
Does this create some kind of collision between googletest versions when we run cmake on project B?