summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-05-18 11:12:01 +0200
committerJo-Philipp Wich <jo@mein.io>2021-05-18 13:11:33 +0200
commited32c42eefbc4560408d53445c603767469c85bd (patch)
tree15db63a3f8c7d74d9013699a067d5c984f820415 /CMakeLists.txt
parentff6811f29065951ab3917460f3d76ffe6ddb0c81 (diff)
compiler, lexer: add NO_LEGACY define to disable legacy syntax features
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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 0dfa62a..1452631 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,8 @@ OPTION(MATH_SUPPORT "Math plugin support" ON)
OPTION(UBUS_SUPPORT "Ubus plugin support" ON)
OPTION(UCI_SUPPORT "UCI plugin support" ON)
+OPTION(LEGACY_SUPPORT "Support deprecated syntax features" ON)
+
SET(LIB_SEARCH_PATH "/usr/lib/ucode/*.so:/usr/share/ucode/*.uc:./*.so:./*.uc" CACHE STRING "Default library search path")
ADD_DEFINITIONS(-DLIB_SEARCH_PATH="${LIB_SEARCH_PATH}")
@@ -31,6 +33,10 @@ ELSE()
ADD_DEFINITIONS(-DNDEBUG)
ENDIF()
+IF(NOT LEGACY_SUPPORT)
+ ADD_DEFINITIONS(-DNO_LEGACY)
+ENDIF()
+
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(JSONC json-c json)
IF(JSONC_FOUND)