Improve docs & CMakeLists.txt
This commit is contained in:
10
readme.md
10
readme.md
@@ -10,7 +10,7 @@ Testing Technology team with Google's specific requirements and constraints in m
|
|||||||
- `CONCURRENT_TESTING` - enable build tests
|
- `CONCURRENT_TESTING` - enable build tests
|
||||||
- `CONCURRENT_EXAMPLES`- enable build examples
|
- `CONCURRENT_EXAMPLES`- enable build examples
|
||||||
|
|
||||||
## Use from another project
|
## Build library
|
||||||
|
|
||||||
1 Clone project:
|
1 Clone project:
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ git clone --branch v1.10.x https://github.com/google/googletest.git
|
|||||||
2 Generate cmake files:
|
2 Generate cmake files:
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
cd concurrent
|
cd googletest
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
@@ -61,4 +61,8 @@ cmake -DCMAKE_BUILD_TYPE=Release ..
|
|||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
cmake --build . --target install
|
cmake --build . --target install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
4 Check cmake output. GTest and GMock libs should be installed;
|
||||||
|
|
||||||
|
5 Remove `FindGTest.cmake` from `<cmake_dir>/modules`.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
project(concurrent_test)
|
project(concurrent_test)
|
||||||
|
|
||||||
find_package(GTest 1.10.0 REQUIRED)
|
find_package(GTest 1.10.0)
|
||||||
|
|
||||||
if (GTest_FOUND)
|
if (GTest_FOUND)
|
||||||
file(GLOB TEST_SOURCES src/*.cpp)
|
file(GLOB TEST_SOURCES src/*.cpp)
|
||||||
@@ -10,7 +10,7 @@ if (GTest_FOUND)
|
|||||||
target_compile_options(concurrent_test PRIVATE -Wno-sign-compare)
|
target_compile_options(concurrent_test PRIVATE -Wno-sign-compare)
|
||||||
|
|
||||||
target_include_directories(concurrent_test PUBLIC include)
|
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_test(test-1 concurrent_test)
|
||||||
|
|
||||||
add_custom_target(check ALL COMMAND concurrent_test)
|
add_custom_target(check ALL COMMAND concurrent_test)
|
||||||
|
|||||||
Reference in New Issue
Block a user