Skip to content

Commit

Permalink
Example app build
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffg-softwarelibre committed May 20, 2024
1 parent 24691a2 commit 8b2a78a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_run_unit_test_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: create-build-dir
run: mkdir build
- name: configure-cmake
run: cd build && cmake -D WAIT_QUEUE_BUILD_TESTS:BOOL=ON -D JM_CIRCULAR_BUFFER_BUILD_TESTS:BOOL=OFF ..
run: cd build && cmake -D PERIODIC_TIMER_BUILD_TESTS:BOOL=ON ..
- name: build
run: cd build && cmake --build . --config $BUILD_TYPE
- name: run-unit-test
Expand Down
22 changes: 22 additions & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2024 by Cliff Green
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at https://www.boost.org/LICENSE_1_0.txt)

cmake_minimum_required ( VERSION 3.14 FATAL_ERROR )

# create project
project ( periodic_timer_example LANGUAGES CXX )

# add executable
add_executable ( periodic_timer_example periodic_timer_example.cpp )
target_compile_features ( periodic_timer_example PRIVATE cxx_std_20 )

set ( CMAKE_THREAD_PREFER_PTHREAD TRUE )
set ( THREADS_PREFER_PTHREAD_FLAG TRUE )
find_package ( Threads REQUIRED )

# link dependencies
target_link_libraries ( periodic_timer_example PRIVATE
Threads::Threads asio periodic_timer )

1 change: 0 additions & 1 deletion test/periodic_timer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <optional>
#include <system_error>

#include "asio/executor_work_guard.hpp"
#include "asio/executor_work_guard.hpp"

#include "timer/periodic_timer.hpp"
Expand Down

0 comments on commit 8b2a78a

Please sign in to comment.