-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a685b0e
commit 2fea241
Showing
7 changed files
with
3,213 additions
and
0 deletions.
There are no files selected for viewing
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
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 | ||
|
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
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) |
Oops, something went wrong.