====================[ Build | pcf2_attribution_calculator_test | Debug - pcs ]====
/usr/bin/cmake --build /root/snap-int-fbpcs/cmake-build-debug---pcs --target pcf2_attribution_calculator_test -- -j 8
[ 13%] Built target empgamecommon
[ 33%] Built target gtest
[ 40%] Built target perftools
[ 53%] Built target gtest_main
[ 60%] Linking CXX executable bin/pcf2_attribution_calculator_test
/usr/bin/ld: /usr/local/lib/libfbpcf.a(S3Util.cpp.o): in function `fbpcf::aws::uriToObjectReference(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
S3Util.cpp:(.text+0x87d): undefined reference to `folly::Uri::Uri(folly::Range<char const*>)'
/usr/bin/ld: /usr/local/lib/libfbpcf.a(GCSUtil.cpp.o): in function `fbpcf::gcp::uriToObjectReference(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
GCSUtil.cpp:(.text+0x1dd): undefined reference to `folly::Uri::Uri(folly::Range<char const*>)'
/usr/bin/ld: CMakeFiles/pcf2_attribution_calculator_test.dir/fbpcs/emp_games/pcf2_attribution/test/AttributionAppTest.cpp.o: in function `pcf2_attribution::verifyOutput(pcf2_attribution::AttributionOutputMetrics, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/root/snap-int-fbpcs/fbpcs/emp_games/pcf2_attribution/test/AttributionTestUtils.h:31: undefined reference to `folly::compareJson(folly::Range<char const*>, folly::Range<char const*>)'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/pcf2_attribution_calculator_test.dir/build.make:222: bin/pcf2_attribution_calculator_test] Error 1
make[2]: *** [CMakeFiles/Makefile2:226: CMakeFiles/pcf2_attribution_calculator_test.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:233: CMakeFiles/pcf2_attribution_calculator_test.dir/rule] Error 2
make: *** [Makefile:201: pcf2_attribution_calculator_test] Error 2
find_package(folly REQUIRED)
set_and_check(FOLLY_INCLUDE_DIR /usr/local/include/folly)
set_and_check(FOLLY_CMAKE_DIR /usr/local/lib/cmake/folly)
if(NOT TARGET Folly::folly)
include("${FOLLY_CMAKE_DIR}/folly-targets.cmake")
endif()
if(NOT folly_FIND_QUIETLY)
message(STATUS "Found folly: ${PACKAGE_PREFIX_DIR}")
endif()
# Test - pcf2_aggregation_test
file(GLOB pcf2_aggregation_test_src
"fbpcs/emp_games/pcf2_aggregation/**.h"
"fbpcs/emp_games/pcf2_aggregation/**.cpp"
"fbpcs/emp_games/pcf2_aggregation/test/**.h"
"fbpcs/emp_games/pcf2_aggregation/test/**.cpp"
"fbpcs/emp_games/common/TestUtil.**"
)
add_executable(
pcf2_aggregation_calculator_test
${pcf2_aggregation_test_src})
target_link_libraries(
pcf2_aggregation_calculator_test
empgamecommon
perftools
gtest_main
Folly:folly
)
install(TARGETS pcf2_aggregation_calculator_test DESTINATION bin)
Could you please share any advice with me on how to proceed with setting up unit tests? Many thanks in advance!