Skip to content

Commit bdb9d38

Browse files
tchaikovsmithfarm
authored andcommitted
cmake: only create sysctl file on linux
and check 64bit platform by using the sizeof(void*) Signed-off-by: Kefu Chai <[email protected]> (cherry picked from commit 89a4818)
1 parent acccd23 commit bdb9d38

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,9 @@ if(WITH_SYSTEMD)
602602
add_subdirectory(systemd)
603603
endif()
604604

605-
add_subdirectory(etc/sysctl)
605+
if(LINUX)
606+
add_subdirectory(etc/sysctl)
607+
endif()
606608

607609
include(CTags)
608610
option(CTAG_EXCLUDES "Exclude files/directories when running ctag.")

etc/sysctl/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|arm|ARM")
1+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
22
# 4194304 is the maximum limit possible on 64-bit CONFIG_BASE_FULL kernels.
33
# Keep the default for 32-bit systems.
44
set(sysctl_pid_max "kernel.pid_max = 4194304")
55
endif()
66

77
configure_file(90-ceph-osd.conf.in
8-
${CMAKE_CURRENT_SOURCE_DIR}/90-ceph-osd.conf @ONLY)
8+
${CMAKE_CURRENT_SOURCE_DIR}/90-ceph-osd.conf
9+
@ONLY)

0 commit comments

Comments
 (0)