Configure the bundled GoogleTest under third_party The GoogleTest submodule was configured inside the runtime output directory, which mixed its build tree with the Ceres executables and differed from how the Abseil submodule is handled. Use the default binary directory mirroring the source tree layout. Change-Id: I6328b4ac5a29d64ded96247be4a92b156eb51b56
diff --git a/CMakeLists.txt b/CMakeLists.txt index da26b18..708baea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -301,7 +301,7 @@ # GoogleTest is only needed for building the tests and must therefore not # be installed alongside Ceres. set(INSTALL_GTEST OFF) - add_subdirectory(${Ceres_SOURCE_DIR}/third_party/googletest ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/googletest) + add_subdirectory(third_party/googletest) set(GTest_FOUND TRUE) ceres_register_found_package(GTest) else()