diff --git a/readme.md b/readme.md index 59b9857..ddc1ade 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ Testing Technology team with Google's specific requirements and constraints in m - `CONCURRENT_TESTING` - enable build tests - `CONCURRENT_EXAMPLES`- enable build examples -## Use from another project +## Build library 1 Clone project: @@ -52,7 +52,7 @@ git clone --branch v1.10.x https://github.com/google/googletest.git 2 Generate cmake files: ```cmd -cd concurrent +cd googletest mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. @@ -61,4 +61,8 @@ cmake -DCMAKE_BUILD_TYPE=Release .. ```cmd cmake --build . --target install -``` \ No newline at end of file +``` + +4 Check cmake output. GTest and GMock libs should be installed; + +5 Remove `FindGTest.cmake` from `/modules`. \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 64196ce..88ebef3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,6 +1,6 @@ project(concurrent_test) -find_package(GTest 1.10.0 REQUIRED) +find_package(GTest 1.10.0) if (GTest_FOUND) file(GLOB TEST_SOURCES src/*.cpp) @@ -10,7 +10,7 @@ if (GTest_FOUND) target_compile_options(concurrent_test PRIVATE -Wno-sign-compare) target_include_directories(concurrent_test PUBLIC include) - target_link_libraries(concurrent_test GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock concurrent) + target_link_libraries(concurrent_test GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main concurrent) add_test(test-1 concurrent_test) add_custom_target(check ALL COMMAND concurrent_test)