google-tests-conan-sample/CMakeLists.txt

20 lines
527 B
CMake
Raw Permalink Normal View History

2021-08-16 16:24:21 +03:00
cmake_minimum_required(VERSION 3.5)
project(BasicC)
enable_testing()
# GoogleTest requires at least C++11
set(CMAKE_CXX_STANDARD 11)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
add_executable(check tests/test.cpp includes/algos.h includes/algos.c)
target_link_libraries(check ${CONAN_LIBS} gtest_main)
include(GoogleTest)
gtest_discover_tests(check)
# add_test(NAME check WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin COMMAND check)
add_executable(prog src/main.c includes/algos.h includes/algos.c)