ref: f26bb483f3417790a8bdce56108996b505c1636f kart/CMakeLists.txt -rw-r--r-- 871 bytes View raw
                                                                                
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
####
# General Settings
###

project(kart)
cmake_minimum_required(VERSION 3.4)
enable_testing()

if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
    message(FATAL_ERROR "Don't use 'cmake .' Create a build folder first")
endif (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)

find_program(GO_PATH go)
if (${GO_PATH} STREQUAL "")
    message(FATAL_ERROR "The Golang binary was not found in the path")
else ()
    execute_process(COMMAND ${GO_PATH} "version" OUTPUT_VARIABLE GO_VERSION)
    if (NOT ${GO_VERSION} MATCHES ".*go1\.1[1-9].*")
        message(FATAL_ERROR "The Golang version is not supported (>= 1.11.*)")
    endif ()
endif ()

####
# Compilation Settings
####
add_subdirectory(defs/go)
add_subdirectory(defs/git)
add_subdirectory(defs/artifacts)

####
# Software
####
add_subdirectory(worker)
add_subdirectory(sorter)
add_subdirectory(web)
add_subdirectory(bot)