summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2020-04-21 03:51:16 +0000
committerEric Haszlakiewicz <erh+git@nimenees.com>2020-04-21 03:57:56 +0000
commit55d053118e68834564e238217f6511ad98e19b8d (patch)
treeb90a528a527f26784b0af02b7f4995dcd2d23c62 /CMakeLists.txt
parentf6f76f9430f0f468a18c937fa7fdd9bf84041d8a (diff)
downloadjson-c-55d053118e68834564e238217f6511ad98e19b8d.tar.gz
Add an apps directory, and a json_parse program to parse an input file and report on memory usage.
This is intended to provide a way, during development, to test out the memory and performance impacts of a change.
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 1d09e50..4d4cc9b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,8 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND
add_subdirectory(tests)
endif()
+add_subdirectory(apps)
+
# Set some packaging variables.
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
@@ -108,6 +110,7 @@ check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) # for getrusage
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("endian.h" HAVE_ENDIAN_H)
@@ -165,6 +168,9 @@ endif()
if (HAVE_SYSLOG_H)
check_symbol_exists(vsyslog "syslog.h" HAVE_VSYSLOG)
endif()
+if (HAVE_SYS_RESOURCE_H)
+ check_symbol_exists(getrusage "sys/resource.h" HAVE_GETRUSAGE)
+endif()
check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL)
check_symbol_exists(strtoull "stdlib.h" HAVE_STRTOULL)