master
CMake tools for testing, benching and packaging
This repo allows easier usage of git.3lp.cx libraries, as well as googletest and google benchmark repos in CMake projects.
Usage
In your CMakeLists.txt add:
include(FetchContent)
FetchContent_Declare(
cmake_tools
GIT_REPOSITORY https://git.3lp.cx/dyadkin/cmake-tools
GIT_TAG master
)
FetchContent_MakeAvailable(cmake_tools)
Testing
include(${cmake_tools_SOURCE_DIR}/recipes/testing.cmake)
Then, link it to your targets:
target_link_libraries(my_target gtest_main)
Benchmarks
Download google benchmark via
download_googlebenchmark()
and link it to you targets:
add_dependencies(my_target googlebenchmark)
target_link_libraries(my_target ${BENCHMARK} ${BENCHMARK_MAIN})
target_include_directories(my_target PRIVATE ${BENCHMARK_INCLUDE})
Languages
CMake
97.1%
C
1.6%
C++
1.3%