Last active
September 15, 2020 09:23
-
-
Save Sibirtsev/cdeead5bd3ce1ecca93f01f42af539ab to your computer and use it in GitHub Desktop.
CMake GTest Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.11) | |
project(GoogleTestDemo) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") | |
add_subdirectory(lib/googletest) | |
include_directories(lib/googletest/googletest/include) | |
include_directories(lib/googletest/googlemock/include) | |
set(SOURCE_FILES main.cpp) # *.cpp | |
add_executable(GoogleTestDemo ${SOURCE_FILES}) | |
target_link_libraries(GoogleTestDemo gtest gtest_main gmock gmock_main) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment