![]() mingw64/src/gtest/cmake/internal_utils.Cmake_minimum_required (VERSION 3. mingw64/lib/cmake/GTest/GTestTargets.cmake mingw64/lib/cmake/GTest/GTestTargets-release.cmake mingw64/lib/cmake/GTest/GTestConfigVersion.cmake mingw64/lib/cmake/GTest/GTestConfig.cmake mingw64/include/gtest/internal/gtest-type-util.h mingw64/include/gtest/internal/gtest-string.h mingw64/include/gtest/internal/gtest-port.h Simply linking against gmockmain should be sufficient. Your output suggests your executable is invoking gmockmain. Right now youre linking against gmockmain and gtestmain. mingw64/include/gtest/internal/gtest-port-arch.h Im not sure if this is the reason, but you dont have to link against all four gtest libraries. mingw64/include/gtest/internal/gtest-param-util.h mingw64/include/gtest/internal/gtest-internal.h (ie link in /usr/lib points to /usr/src) I then did the same for GMock. I then sym linked the libraries creaetd in /usr/src in /usr/lib. Broadly speaking installed as follows sudo apt-get install libgtest-dev cmake CMakeLists.txt make. mingw64/include/gtest/internal/gtest-filepath.h I have installed GTest and GMock on my Ubuntu 17.04 box. mingw64/include/gtest/internal/gtest-death-test-internal.h mingw64/include/gtest/internal/custom/gtest.h CMake ExternalProjectAdd for Google Mock (gmock) and Google Test (gtest) Libraries With Includes and Example Usage. mingw64/include/gtest/internal/custom/gtest-printers.h mingw64/include/gtest/internal/custom/gtest-port.h mingw64/include/gtest/internal/custom/README.md mingw64/include/gtest/gtest-typed-test.h mingw64/include/gtest/gtest-param-test.h mingw64/include/gtest/gtest-death-test.h ![]() mingw64/include/gtest/gtest-assertion-result.h mingw64/include/gmock/internal/gmock-pp.h mingw64/include/gmock/internal/gmock-port.h mingw64/include/gmock/internal/gmock-internal-utils.h gtestmain A main function seems out of place being placed in a directory specifically for test cases. mingw64/include/gmock/internal/custom/gmock-port.h mingw64/include/gmock/internal/custom/gmock-matchers.h Or you can disable warnings in the code itself. If there is any practical option of fixing those warnings, it would be better in the long run. mingw64/include/gmock/internal/custom/gmock-generated-actions.h Note: addgtest is just a macro that adds gtest, gmock, and gtestmain, and then runs addtest to create a test with the same name: targetlinklibraries (SimpleTest gtest gmock gtestmain) addtest (SimpleTest SimpleTest) FetchContent: CMake 3.11. set (CMAKECFLAGS '-g -O0 -fprofile-arcs -ftest-coverage') Of course, compiler warnings are normally a good thing. mingw64/include/gmock/internal/custom/README.md My CMake file, shown below, should ostensibly allow for file. mingw64/include/gmock/gmock-spec-builders.h This is my first time attempting the Google Test API in C++ and one of my first experiences with CMake. mingw64/include/gmock/gmock-nice-strict.h mingw64/include/gmock/gmock-more-matchers.h mingw64/include/gmock/gmock-more-actions.h mingw64/include/gmock/gmock-function-mocker.h mingw64/include/gmock/gmock-cardinalities.h
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |