mirror of https://github.com/darlinghq/darling
LKM build from CMake (resolves #280)
This commit is contained in:
parent
1dda3fd5ac
commit
b2f23864f7
|
|
@ -5,6 +5,9 @@ enable_language(ASM)
|
|||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
include(InstallSymlink)
|
||||
include(MacroEnsureOutOfSourceBuild)
|
||||
|
||||
MACRO_ENSURE_OUT_OF_SOURCE_BUILD()
|
||||
|
||||
set(DARLING_TOP_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(DARLING_NO_EXECUTABLES OFF)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
macro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD )
|
||||
string( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _insource )
|
||||
if( _insource )
|
||||
message( FATAL_ERROR
|
||||
"In-source builds are not allowed.
|
||||
CMake would overwrite the Linux kernel module Makefile.
|
||||
Please create a directory and run cmake from there, passing the path
|
||||
to this source directory as the last argument.
|
||||
This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
|
||||
Please delete them."
|
||||
)
|
||||
endif( _insource )
|
||||
endmacro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD )
|
||||
|
||||
|
|
@ -188,11 +188,6 @@ add_subdirectory(external/zsh)
|
|||
add_subdirectory(external/doc_cmds)
|
||||
add_subdirectory(external/libcxxabi)
|
||||
add_subdirectory(external/libcxx)
|
||||
add_subdirectory(lkm)
|
||||
|
||||
#######################
|
||||
# Linux kernel module #
|
||||
#######################
|
||||
|
||||
add_custom_target(lkm
|
||||
COMMAND gmake
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lkm")
|
||||
|
|
|
|||
2
src/lkm
2
src/lkm
|
|
@ -1 +1 @@
|
|||
Subproject commit 5a5b433f109933a584328ba2c161906f4165be8a
|
||||
Subproject commit 00c2c8e39d2919736da09e0735d94eeb316929a5
|
||||
Loading…
Reference in New Issue