From c9d7c3ed3c4ff37f6b527760a434ed22ae680f81 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Sat, 5 Nov 2016 06:59:47 +0000 Subject: [PATCH] add options to explicitly use internal ctype or string functions --- CMakeLists.txt | 2 ++ src/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee14261..12cce5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.1.0) project(taihen-parser) option(TEST "build and perform tests" OFF) +option(USE_INBUILT_CTYPE "use internal ctype over system" OFF) +option(USE_INBUILT_STRING "use internal string over system" OFF) include_directories(include) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1fb12b9..af1e2dd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,11 +7,11 @@ endif() check_include_file(ctype.h HAVE_CTYPE) check_include_file(string.h HAVE_STRING) -if (NOT ${HAVE_CTYPE}) +if ((NOT ${HAVE_CTYPE}) OR ${USE_INBUILT_CTYPE}) add_definitions(-DNO_CTYPE) endif() -if (NOT ${HAVE_STRING}) +if ((NOT ${HAVE_STRING}) OR ${USE_INBUILT_STRING}) add_definitions(-DNO_STRING) endif() -- 2.39.5