-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
29 lines (25 loc) · 974 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 3.0)
project(coroutine_monad)
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/std-make/include)
target_sources(${PROJECT_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/return_object_holder.h
${CMAKE_CURRENT_SOURCE_DIR}/maybe.h
${CMAKE_CURRENT_SOURCE_DIR}/state.h
${CMAKE_CURRENT_SOURCE_DIR}/monad_promise.h
)
if(MSVC)
target_compile_options(${PROJECT_NAME} INTERFACE /std:c++latest /await)
else()
target_compile_options(${PROJECT_NAME} INTERFACE -Wall -Wpedantic -std=c++17 -fcoroutines-ts -stdlib=libc++)
target_link_libraries(${PROJECT_NAME} INTERFACE -stdlib=libc++)
endif()
add_executable(test_${PROJECT_NAME}
test_main.cpp
test_optional.cpp
test_expected.cpp
test_state.cpp
)
target_link_libraries(test_${PROJECT_NAME} ${PROJECT_NAME})
enable_testing()
add_test(test_${PROJECT_NAME} test_${PROJECT_NAME})