Skip to content

Commit

Permalink
Initial copies, lots of work to do
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffg-softwarelibre committed May 19, 2024
1 parent a685b0e commit 2fea241
Show file tree
Hide file tree
Showing 7 changed files with 3,213 additions and 0 deletions.
51 changes: 51 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (c) 2024 by Cliff Green
#
# https://github.com/connectivecpp/periodic-timer
#
# I'm still learning CMake, so improvement suggestions are always welcome.
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

cmake_minimum_required ( VERSION 3.14 FATAL_ERROR )

project ( periodic_timer
LANGUAGES CXX
DESCRIPTION "A multi producer / multi consumer thread safe wait queue"
HOMEPAGE_URL "https://githug.com/connectivecpp/wait-queue/" )

option ( WAIT_QUEUE_BUILD_TESTS "Build unit tests" OFF )
option ( WAIT_QUEUE_BUILD_EXAMPLES "Build examples" OFF )
option ( WAIT_QUEUE_INSTALL "Install header only library" OFF )

# add library targets

add_library ( wait_queue INTERFACE )
add_library ( chops::wait_queue ALIAS wait_queue )

# configure library target

target_include_directories ( wait_queue INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
$<INSTALL_INTERFACE:include/> )
target_compile_features ( wait_queue INTERFACE cxx_std_20 )

# check to build unit tests
if ( ${WAIT_QUEUE_BUILD_TESTS} )
enable_testing()
add_subdirectory ( test )
endif ()

# check to build example code
if ( ${WAIT_QUEUE_BUILD_EXAMPLES} )
add_subdirectory ( example )
endif ()

# check to install
if ( ${WAIT_QUEUE_INSTALL} )
set ( CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt )
include ( CPack )
endif ()

# end of file

10 changes: 10 additions & 0 deletions cmake/download_cpm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# copied from CPM.cmake GitHub site
# download CPM.cmake

file(
DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.39.0/CPM.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
)
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
Loading

0 comments on commit 2fea241

Please sign in to comment.