-
Notifications
You must be signed in to change notification settings - Fork 36
/
CMakeLists.txt
122 lines (122 loc) · 2.07 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
cmake_minimum_required(VERSION 3.13)
project(SGE VERSION 1.0)
SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../../lib/lx-amd64")
add_compile_definitions(
SGE_ARCH_STRING="lx-amd64"
LINUX
LINUXAMD64
GETHOSTBYNAME_R6
GETHOSTBYADDR_R8
TARGET_64BIT
SGE_PQS_API
SPOOLING_dynamic
SECURE
HAVE_HWLOC=1
NO_JNI
COMPILE_DC
__SGE_COMPILE_WITH_GETTEXT__
__SGE_NO_USERMAPPING__
)
execute_process(COMMAND realpath /sbin/init COMMAND grep -q systemd RESULT_VARIABLE SYSTEMD)
if (SYSTEMD EQUAL "0")
execute_process(COMMAND pkgconf --modversion systemd OUTPUT_VARIABLE SYSTEMD_VERSION)
if (SYSTEMD_VERSION VERSION_GREATER_EQUAL "250")
add_compile_definitions(HAVE_SYSTEMD=2)
elseif (SYSTEMD_VERSION VERSION_GREATER_EQUAL "222")
add_compile_definitions(HAVE_SYSTEMD=1)
endif()
endif()
execute_process(COMMAND ldd /bin/ls COMMAND grep -q musl RESULT_VARIABLE MUSL)
if (MUSL EQUAL "0")
add_compile_definitions(MUSL)
endif()
add_compile_options(
-fPIC
-O2
-Wstrict-prototypes
)
add_link_options(
-lm
-pthread
-rdynamic
)
add_subdirectory(source)
install(
PROGRAMS
source/dist/install_execd
source/dist/install_qmaster
source/dist/inst_sge
DESTINATION .
)
install(
DIRECTORY
doc/man
source/dist/examples
source/dist/hadoop
source/dist/mpi
source/dist/pvm
source/dist/qmon
source/dist/util
DESTINATION .
USE_SOURCE_PERMISSIONS
)
install(
TARGETS
qacct
qalter
qconf
qdel
qevent
qhost
qmod
qmon
qping
qquota
qrdel
qrstat
qrsub
qsh
qstat
qsub
qtcsh
sge_coshepherd
sge_execd
sge_qmaster
sge_shadowd
sge_shepherd
sgepasswd
DESTINATION bin/lx-amd64
)
if (NOT MUSL EQUAL "0")
install(TARGETS qmake DESTINATION bin/lx-amd64)
endif()
install(
TARGETS
adminrun
checkprog
checkuser
filestat
gethostbyaddr
gethostbyname
gethostname
getservbyname
infotext
loadcheck
now
qrsh_starter
spooldefaults
spoolinit
testsuidroot
uidgid
authuser
DESTINATION utilbin/lx-amd64
)
install(
TARGETS
spoolb
spoolc
DESTINATION lib/lx-amd64
)
install(
CODE "execute_process(COMMAND \"./CMakePostInstall.sh\" ${CMAKE_INSTALL_PREFIX})"
)