diff options
author | Mark Pulford <mark@kyne.com.au> | 2012-01-19 00:19:47 +1030 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2012-03-04 18:54:35 +1030 |
commit | 88bb249473db4e4923e4c27a8e3ece7a77e738ce (patch) | |
tree | 9c7d5d537fb539aca1f17b75c7296d1f6489de22 /CMakeLists.txt | |
parent | 1a5460be319ac29af31f201fbf9775340262ba9b (diff) | |
download | lua-cjson-88bb249473db4e4923e4c27a8e3ece7a77e738ce.tar.gz lua-cjson-88bb249473db4e4923e4c27a8e3ece7a77e738ce.tar.bz2 lua-cjson-88bb249473db4e4923e4c27a8e3ece7a77e738ce.zip |
Disable registration of cjson global variable
Disable registration of cjson module table global variable in the
default build. Automatically creating a variable in the global namespace
can cause issues for other software and is no longer recommended with
Lua.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3768fc4..c18381f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -6,7 +6,7 @@ | |||
6 | project(lua-cjson C) | 6 | project(lua-cjson C) |
7 | cmake_minimum_required(VERSION 2.6) | 7 | cmake_minimum_required(VERSION 2.6) |
8 | 8 | ||
9 | option(DISABLE_CJSON_GLOBAL "Disable global registration of the 'cjson' module table") | 9 | option(ENABLE_CJSON_GLOBAL "Register cjson module table as a global variable - not recommended") |
10 | option(USE_INTERNAL_DTOA "Use internal strtod() / dtoa code for performance") | 10 | option(USE_INTERNAL_DTOA "Use internal strtod() / dtoa code for performance") |
11 | option(MULTIPLE_THREADS | 11 | option(MULTIPLE_THREADS |
12 | "Build internal dtoa with support for multi-threaded applications - recommended" ON) | 12 | "Build internal dtoa with support for multi-threaded applications - recommended" ON) |
@@ -20,8 +20,8 @@ endif() | |||
20 | find_package(Lua51 REQUIRED) | 20 | find_package(Lua51 REQUIRED) |
21 | include_directories(${LUA_INCLUDE_DIR}) | 21 | include_directories(${LUA_INCLUDE_DIR}) |
22 | 22 | ||
23 | if(DISABLE_CJSON_GLOBAL) | 23 | if(ENABLE_CJSON_GLOBAL) |
24 | add_definitions(-DDISABLE_CJSON_GLOBAL) | 24 | add_definitions(-DENABLE_CJSON_GLOBAL) |
25 | endif() | 25 | endif() |
26 | 26 | ||
27 | if(NOT USE_INTERNAL_DTOA) | 27 | if(NOT USE_INTERNAL_DTOA) |