summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-01-18 10:42:46 +0100
committerJo-Philipp Wich <jo@mein.io>2022-01-18 11:21:20 +0100
commit3578afee0ab77650cf6adf3987a6f653f9311e9b (patch)
tree4c57d279a8b54df10e6b194b586d3f6423d8e7cd /CMakeLists.txt
parent371ba457917cf319b74de5a56e17782f6c4cd77a (diff)
build: support building without compile capabilities
Introduce a new default enable CMake option "COMPILE_SUPPORT" which allows to disable source code compilation in the ucode interpreter. Such an interpreter will only be able to load precompiled ucode files. 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 1430a61..0621d51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,12 @@ ADD_DEFINITIONS(-Wmissing-declarations -Wno-error=unused-variable -Wno-unused-pa
INCLUDE_DIRECTORIES(include)
+OPTION(COMPILE_SUPPORT "Support compilation from source" ON)
+
+IF(NOT COMPILE_SUPPORT)
+ ADD_DEFINITIONS(-DNO_COMPILE)
+ENDIF()
+
OPTION(FS_SUPPORT "Filesystem plugin support" ON)
OPTION(MATH_SUPPORT "Math plugin support" ON)
OPTION(UBUS_SUPPORT "Ubus plugin support" ON)