Потребовалось вынести из проекта поддиреткорию, которая указывалась с помощью add_subdirectory, теперь cmake выдает ошибку
CMake Error at unit_tests/CMakeLists.txt:2 (add_subdirectory):
add_subdirectory not given a binary directory but the given source
directory "/home/anton/dev/techno_park/cpp/task2/googletest" is not a
subdirectory of
"/home/anton/dev/techno_park/cpp/task2/filemetrics/unit_tests". When
specifying an out-of-tree source a binary directory must be explicitly
specified.
Как подключить директрию, не являющуюся подкаталогом ? cmake файл
project(unit_tests)
add_subdirectory(${CMAKE_SOURCE_DIR}/../googletest)
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
add_executable(Google_Tests_run str_tests.cpp str_map_tests.cpp vec_tests.cpp
tf_idf_priority_queue_tests.cpp file_metric_tests.cpp)
target_link_libraries(Google_Tests_run gtest gtest_main)