-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (41 loc) · 1.02 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#-----------------------------------------------------
# Build strsepf
# Usage:
# mkdir build && cd build
# cmake ..
#
# mkdir buildtests && cd buildtests
# cmake .. -DBUILD_TESTING=ON
#
#
# G.Berthiaume - 2019
#-----------------------------------------------------
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project("strsepf"
DESCRIPTION "A header only C11 library that provides string parsing, combining the memory safety of strsep and the convenience of a sscanf-like interface."
HOMEPAGE_URL "https://github.com/g-berthiaume/strsepf"
VERSION 1.0.0
LANGUAGES C)
#
# Build options
#
option(BUILD_TESTING "Build unit tests" OFF)
#
# Languages
#
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_STANDARD_REQUIRED ON)
#
# Build project
#
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE src/)
#
# Unit testing
#
if(BUILD_TESTING)
include(CTest)
enable_testing()
add_subdirectory(test/)
endif()