From: David Morgan Date: Sat, 5 Nov 2016 06:59:47 +0000 (+0000) Subject: add options to explicitly use internal ctype or string functions X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=c9d7c3ed3c4ff37f6b527760a434ed22ae680f81;p=console%2Ftaihen-parser.git add options to explicitly use internal ctype or string functions --- 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()