added first batch
This commit is contained in:
parent
b9d9b65a1d
commit
22d42fa236
9 changed files with 107 additions and 0 deletions
|
|
@ -1,2 +1,45 @@
|
|||
# CMake configuration for demo project
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_CLANG_TIDY clang-tidy)
|
||||
set(BOOST_ENABLE_CMAKE ON)
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --tags --dirty --always
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE VERSION_STRING
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
string(REGEX REPLACE "^v?([0-9]+)\\.([0-9]+)\\.([0-9]+).*$" "\\1.\\2.\\3"
|
||||
MODIFIED_VERSION_STRING "${VERSION_STRING}")
|
||||
project(
|
||||
collector
|
||||
VERSION ${MODIFIED_VERSION_STRING}
|
||||
LANGUAGES CXX)
|
||||
|
||||
include(FetchContent)
|
||||
set(FETCHCONTENT_QUIET FALSE)
|
||||
|
||||
FetchContent_Declare(
|
||||
boostorg
|
||||
GIT_REPOSITORY https://github.com/boostorg/boost.git
|
||||
GIT_TAG boost-1.80.0
|
||||
GIT_PROGRESS TRUE
|
||||
GIT_SHALLOW TRUE
|
||||
FETCHCONTENT_QUIET FALSE)
|
||||
|
||||
FetchContent_MakeAvailable(boostorg)
|
||||
|
||||
|
||||
enable_testing()
|
||||
|
||||
configure_file(version.hpp.in ${PROJECT_SOURCE_DIR}/version.hpp)
|
||||
|
||||
add_executable(collector_test test.cpp)
|
||||
target_compile_options(${PROJECT_NAME}_test PUBLIC -Wall -Wextra -Wshadow
|
||||
-Wnon-virtual-dtor)
|
||||
add_test(NAME test1 COMMAND collector_test)
|
||||
|
||||
target_link_libraries(collector_test PRIVATE Boost::filesystem Boost::system
|
||||
Boost::unit_test_framework)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue