]> Chaos Git - console/taihen-parser.git/commitdiff
add options to explicitly use internal ctype or string functions
authorDavid Morgan <davee@x-fusion.co.uk>
Sat, 5 Nov 2016 06:59:47 +0000 (06:59 +0000)
committerDavid Morgan <davee@x-fusion.co.uk>
Sat, 5 Nov 2016 06:59:47 +0000 (06:59 +0000)
CMakeLists.txt
src/CMakeLists.txt

index ee14261fa7b9ddbf1d04c998dd734ef634d99538..12cce5a022a01f6c1915849950b31acfa921ef4d 100644 (file)
@@ -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)
 
index 1fb12b9c53764ea046fb8fc89c1316a5b39df8c6..af1e2dd0b770339c8009ec76bccb62000a7541be 100644 (file)
@@ -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()