Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,22 @@ jobs:
- name: test-release-g++
run: |
cd build-release-g++
ctest -VV
ctest -VV
build-windows-2022:
name: windows-2022
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: build-release-cl
run: |
mkdir build-release-cl
cd build-release-cl
cmake ..
cmake --build . --config Release
- name: test-release-cl
run: |
cd build-release-cl
ctest --build-config Release -VV
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.15)
include(CMakeDependentOption)
project(libcoro
VERSION 0.9.0
LANGUAGES CXX
Expand All @@ -22,9 +23,9 @@ option(LIBCORO_EXTERNAL_DEPENDENCIES "Use Cmake find_package to resolve dependen
option(LIBCORO_BUILD_TESTS "Build the tests, Default=ON." ON)
option(LIBCORO_CODE_COVERAGE "Enable code coverage, tests must also be enabled, Default=OFF" OFF)
option(LIBCORO_BUILD_EXAMPLES "Build the examples, Default=ON." ON)
option(LIBCORO_FEATURE_THREADING "Include multithreading features, Default=ON." ON)
option(LIBCORO_FEATURE_NETWORKING "Include networking features, Default=ON." ON)
option(LIBCORO_FEATURE_SSL "Include SSL encryption features, Default=ON." ON)
cmake_dependent_option(LIBCORO_FEATURE_THREADING "Include multithreading features, Default=ON." ON "NOT MSVC" OFF)
cmake_dependent_option(LIBCORO_FEATURE_NETWORKING "Include networking features, Default=ON." ON "NOT MSVC" OFF)
cmake_dependent_option(LIBCORO_FEATURE_SSL "Include SSL encryption features, Default=ON." ON "NOT MSVC" OFF)

message("${PROJECT_NAME} LIBCORO_EXTERNAL_DEPENDENCIES = ${LIBCORO_EXTERNAL_DEPENDENCIES}")
message("${PROJECT_NAME} LIBCORO_BUILD_TESTS = ${LIBCORO_BUILD_TESTS}")
Expand Down Expand Up @@ -114,6 +115,10 @@ add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "")
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
target_include_directories(${PROJECT_NAME} PUBLIC include)
if(MSVC)
# Not sure why this is only needed on Windows.
target_include_directories(${PROJECT_NAME} PUBLIC vendor/tartanllama/expected/include)
endif()
if(LIBCORO_FEATURE_THREADING)
target_link_libraries(${PROJECT_NAME} PUBLIC pthread tl::expected)
target_compile_definitions(${PROJECT_NAME} PUBLIC LIBCORO_FEATURE_THREADING)
Expand Down
1 change: 0 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ elseif(MSVC)
target_compile_options(coro_task PUBLIC /W4)
target_compile_options(coro_generator PUBLIC /W4)
target_compile_options(coro_event PUBLIC /W4)
target_compile_options(coro_latch PUBLIC /W4)
target_compile_options(coro_mutex PUBLIC /W4)
target_compile_options(coro_thread_pool PUBLIC /W4)
target_compile_options(coro_semaphore PUBLIC /W4)
Expand Down