forked from mattthias/slurm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (26 loc) · 1.02 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
cmake_minimum_required(VERSION 2.8)
# Project name
project(slurm)
# We need ncurses
set(CURSES_NEED_NCURSES true)
find_package(Curses REQUIRED)
if (CURSES_HAVE_NCURSES_H)
add_definitions(-D_HAVE_NCURSES)
endif()
set(SLURM_SOURCES slurm.c)
# CentOS 6 / CentOS 7 only have very old cmake version where the FindCurses
# module does not work well. It stops to search for ncurses if it found
# curses. Thats bad for us so we set asume that we have ncurses when the os is
# some RedHat like
execute_process(COMMAND /bin/ls /etc/redhat-release OUTPUT_VARIABLE IS_REDHAT ERROR_QUIET)
if (IS_REDHAT )
MESSAGE( STATUS "RedHat's cmake ist to old (FindCurse is somewhat broken) so we set _HAVE_NCURSES by hand.")
add_definitions(-D_HAVE_NCURSES)
endif()
add_definitions(-D_HAVE_CHECKINTERFACE)
add_executable(slurm ${SLURM_SOURCES})
target_link_libraries(slurm ncurses)
# install
install(TARGETS slurm DESTINATION bin)
install(DIRECTORY themes/ DESTINATION share/slurm PATTERN "*.theme")
install(FILES slurm.1 DESTINATION share/man/man1)