summaryrefslogtreecommitdiffstats
path: root/cmake/common.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/common.cmake')
-rw-r--r--cmake/common.cmake10
1 files changed, 9 insertions, 1 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)