-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (30 loc) · 908 Bytes
/
CMakeLists.txt
File metadata and controls
35 lines (30 loc) · 908 Bytes
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
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.0.0)
set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
CACHE STRING "Vcpkg toolchain file")
project(leetcode VERSION 0.1.0)
find_package(range-v3 CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)
find_package(Threads REQUIRED)
find_package(unifex CONFIG REQUIRED)
include(CTest)
enable_testing()
function(add_exe exe)
add_executable(${exe} ${exe}.cpp)
target_compile_features(${exe} PRIVATE cxx_std_20)
target_compile_options(${exe} PRIVATE -fcoroutines-ts -Wall -pedantic)
target_link_libraries(${exe} PRIVATE
fmt::fmt
range-v3
range-v3-meta
range-v3::meta
range-v3-concepts
Threads::Threads
unifex::unifex)
endfunction()
add_exe(coFuture)
add_exe(compareVersion)
add_exe(shellSubstitute)
add_exe(sandr)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)