summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/common.cmake10
-rw-r--r--cmake/config.cmake.sample6
2 files changed, 14 insertions, 2 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index 4c85498..1d43a73 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -52,7 +52,7 @@ macro(PROJECT_TARGET_ADD TARGET_NAME)
set(TARGET_NAME ${TARGET_NAME})
endmacro(PROJECT_TARGET_ADD)
-# Check GCC minimal version version
+# Check GCC minimal version
if (gcc_minimal_version)
message (STATUS "${Blue}-- Check gcc_minimal_version (found gcc version ${CMAKE_C_COMPILER_VERSION}) (found g++ version ${CMAKE_CXX_COMPILER_VERSION})${ColourReset}")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version} OR CMAKE_C_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version})
@@ -60,6 +60,14 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_minimal_version} OR CMAKE_C_CO
endif()
endif(gcc_minimal_version)
+# Check Kernel minimal version
+if (kernel_minimal_version)
+ message (STATUS "${Blue}-- Check kernel_minimal_version (found kernel version ${CMAKE_SYSTEM_VERSION})${ColourReset}")
+ if (CMAKE_SYSTEM_VERSION VERSION_LESS ${kernel_minimal_version})
+ message(FATAL_ERROR "${Red}**** FATAL: Require at least ${kernel_minimal_version} please use a recent kernel.")
+endif()
+endif(kernel_minimal_version)
+
macro(defstr name value)
add_definitions(-D${name}=${value})
endmacro(defstr)
diff --git a/cmake/config.cmake.sample b/cmake/config.cmake.sample
index 66be37c..27d9f17 100644
--- a/cmake/config.cmake.sample
+++ b/cmake/config.cmake.sample
@@ -44,9 +44,13 @@ set(PROJECT_APP_TEMPLATES_DIR "conf.d")
# ----------------------------------
set(CMAKE_BUILD_TYPE "DEBUG")
+# Kernel selection if needed. Impose a minimal version.
+# -----------------------------------------------
+set (kernel_minimal_version 4.8)
+
# Compiler selection if needed. Impose a minimal version.
# -----------------------------------------------
-set (gcc_minimal_version 4.9)
+set (gcc_minimal_version 4.9)
# PKG_CONFIG required packages
# -----------------------------