-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (26 loc) · 748 Bytes
/
CMakeLists.txt
File metadata and controls
35 lines (26 loc) · 748 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.5)
project(cpparg)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
file(GLOB HEADERS
include/cpparg/cpparg.h
)
add_library(${PROJECT_NAME} INTERFACE)
add_library(cpparg::cpparg ALIAS ${PROJECT_NAME})
target_sources(${PROJECT_NAME} INTERFACE
${HEADERS}
)
target_include_directories(
${PROJECT_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/include/
)
option(CPPARG_BUILD_TESTS "Build tests" OFF)
if (${CPPARG_BUILD_TESTS})
enable_testing()
add_subdirectory(test)
endif()
option(CPPARG_BUILD_EXAMPLES "Build examples" OFF)
if (${CPPARG_BUILD_EXAMPLES})
add_subdirectory(examples)
endif()