Series
Guide
download
1
| wget https://github.com/google/googletest/archive/release-1.8.0.zip
|
compile
1 2 3
| mkdir build cd build sudo cmake-gui ..
|
with options
BUILD_SHARED_LIBS ON
CMAKE_CONFIGURATION_TYPES Release
compile and install gtest to C:\Program Files\gtest
.
CMakeLists.txt
1 2 3 4 5 6 7 8 9 10 11 12
| if(MSVC) SET(GTEST_ROOT "C:/Program Files/gtest") else() MESSAGE( [Main] " BOOST_THREAD_LIBRARY = ${BOOST_THREAD_LIBRARY}") endif(MSVC)
find_package(GTest REQUIRED)
find_package(GTest REQUIRED) include_directories(${GTEST_INCLUDE_DIRS}) target_link_libraries(demo ${GTEST_LIBRARIES} ${BOOST_THREAD_LIBRARY})
|
Reference
History