I have been sitting online for hours already trying to setup Google test on Clion in Linux but have not been able to find anything.
Can someone guide me with setting thi
1.Git clone the google-test C++ test framework
From https://github.com/google/googletest.git
2.Include the google-test directories
#Add the google test subdirectory
add_subdirectory(PATH_TO_GOOGLETEST)
#include googletest/include dir
include_directories(PATH_TO_GOOGLETEST/googletest/include)
#include the googlemock/include dir
include_directories(PATH_TO_GOOGLETEST/googlemock/include)
3. Link your executable with google-test (This is after creating your executable)
#Define your executable
add_executable(EXECUTABLE_NAME ${SOURCE_FILES})
#Link with GoogleTest
target_link_libraries(EXECUTABLE_NAME gtest gtest_main)
#Link with GoogleMock
target_link_libraries(EXECUTABLE_NAME gmock gmock_main)