cisco/CMakeLists.txt -rw-r--r-- 1014 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
38
39
40
41
42
43
44
45
46
47
48
49
50
####
# General Settings
###

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/ansible)

####
# External contributions
####
add_subdirectory(contrib)

####
# Software
####
add_subdirectory(api)
add_subdirectory(slave)
add_subdirectory(sdk)
add_subdirectory(csc)

####
# Deployment
####
add_subdirectory(deploy)

add_custom_target(
    cisco
    DEPENDS lf-cloud-api lf-slave lf-slave-arm
)