aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-07-04 15:01:30 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2024-07-04 15:01:30 -0400
commit6f296b296842c98b590c1686fb254ef1accf19b5 (patch)
treeadce093c2189150954e9c525a72f97f61e64852d /CMakeLists.txt
parentuse ubuntu 24 (diff)
downloadcli-6f296b296842c98b590c1686fb254ef1accf19b5.zip
Optionally include strlcat
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27230b8..aa4eb23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,12 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Wall -Wextra -ansi)
endif()
+include(CheckFunctionExists)
+check_function_exists(strlcat HAVE_STRLCAT)
+if(NOT HAVE_STRLCAT)
+ add_definitions(-DHAVE_STRLCAT=1)
+endif()
+
set(SRC_FILES
src/linebuffer.c
src/word.c