在Code Blocks上使用gtest
Step 0. 事前準備
下載Google Test : gtest-1.7.0
下載CMake : cmake-3.2.0-rc2
Step.1 用CMake編譯Google Test
- 將CMake安裝或解壓縮至適當路徑
- 執行\bin下的cmake-gui.exe
- 在”Where is the source code:”中填入gtest-1.7.0的路徑
- 在”Where to build the binaries:”中填入欲放置bulid完成的資料, 這邊我在gtest-1.7.0路徑下建立了一個build-codeblocks-mingw資料夾
- 按下Configure