????Google ??Gtest????????C/C++???????????????????gtest???μ?Makefile???????????sample????滻?????????????????????make???????е????????????????????????滻????????????дCMakeList.txt????????cmake???б????????????????
??????????ubuntu14.04??cmake 2.8.12.2?? gtest-1.7.0
????1???ο?gtest???μ?cmake??????????????£????
????1 cd gtest-1.7.0
????2 mkdir build
????3 cmake -Dgtest_build_samples=ON ..
????4 make
???????????????????build??????????????sample??????????????????????????libgtest.a??libgtest_main.a??libgtest.a??????????????include???????libgtest_main.a??????????????????main????????

????2?????????????????дCMakeList.txt
???????????????gtest???μ?????????????????????????????£???????????????GTEST_ROOT??
????1 GTEST_ROOT="/home/yht/gtest-1.7.0"
????2 export GTEST_ROOT
??????1?????????????libgtest.a??libgtest_main.a???????GTEST_ROOT/mybuild?????????????λ?ú???????????д??CMakeList.txt??????£?
????1 cmake_minimum_required(VERSION 2.6)
????2
????3 enable_testing()
????4 find_package (Threads)
????5 include_directories($ENV{GTEST_ROOT}/include)
????6 link_directories($ENV{GTEST_ROOT}/mybuild)
????7 link_directories(/usr/local/lib)
????8 add_executable(uuid_generator uuid_generator.cpp ./unittest/uuid_generator_unittest.cpp)
????9 target_link_libraries(uuid_generator gtest gtest_main) #???????
????10 target_link_libraries(uuid_generator ${CMAKE_THREAD_LIBS_INIT})
????11 add_test(NAME uuid_generator COMMAND uuid_generator)
?????????:
????./
????+--uuid_generator.h
????+--uuid_generator.cpp
????+---------unittest/
????+--uuid_generator_unittest.cpp
????+----------build/
????3????./build???????cmake ..??make?????????????uuid_generator??????./uuid_generator??в???????

????4???ο???????????????????
????https://lembra.wordpress.com/2011/10/17/building-google-test-framework-with-cmake/
????http://stackoverflow.com/questions/8507723/how-to-start-working-with-gtest-and-cmake
????http://stackoverflow.com/questions/5900447/simplest-example-of-using-google-c-testing-framework-with-cmake?rq=1