summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorSimon Rettberg2023-06-09 10:58:47 +0200
committerSimon Rettberg2023-06-09 10:58:47 +0200
commitf92df1d82244894ee6137e41572a73684bc8fdfb (patch)
treea4273767ceba8fa1c3df958d5a5012c1a9967e16 /cmake
parentUpdate README.md (diff)
downloaddnbd3-f92df1d82244894ee6137e41572a73684bc8fdfb.tar.gz
dnbd3-f92df1d82244894ee6137e41572a73684bc8fdfb.tar.xz
dnbd3-f92df1d82244894ee6137e41572a73684bc8fdfb.zip
cmake: Make missing Module.symvers a warning
Since on github, we just compile against downloaded sources without having a matching built kernel, a missing Module.symvers breaks the action. While the resulting built kernel module might not be of much use, all we want to know is whether it compiles.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindKernelHeaders.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/FindKernelHeaders.cmake b/cmake/FindKernelHeaders.cmake
index 7c1f8ed..c04243e 100644
--- a/cmake/FindKernelHeaders.cmake
+++ b/cmake/FindKernelHeaders.cmake
@@ -16,7 +16,9 @@ if(NOT KERNEL_INSTALL_DIR)
endif(NOT KERNEL_INSTALL_DIR)
if(NOT EXISTS "${KERNEL_BUILD_DIR}/Module.symvers")
- message(FATAL_ERROR "Module.symvers not found in ${KERNEL_BUILD_DIR}")
+ message(WARNING "\n\nModule.symvers not found in ${KERNEL_BUILD_DIR}\n"
+ "Your kernel sources don't seem to belong to a built kernel,"
+ " expect missing symbols when building kernel module.\n\n")
endif()
# find the Linux kernel headers from given KERNEL_BUILD_DIR