forked from CEA-Leti/wsnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·72 lines (57 loc) · 2.89 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
#------------------------------------------------------------------------------
# Top-level CMake file for WSNET.
#
# Author: Luiz Henrique Suraty Filho
# ------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.11.0)
# -----------------------------------------------------------------------------
# Config paths to auxiliary files
# -----------------------------------------------------------------------------
set(WSNET_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake" CACHE PATH "The path to the cmake directory")
set(WSNET_SRC_PATH "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "The path to the wsnet source directory")
set(WSNET_INSTALLED_PATH "$ENV{WSNET_INSTALLED_PATH}" CACHE PATH "The path to the wsnet installation directory")
if(NOT WSNET_INSTALLED_PATH)
message(STATUS "Using ${CMAKE_CURRENT_LIST_DIR}/installed as install path")
set(WSNET_INSTALLED_PATH "${CMAKE_CURRENT_LIST_DIR}/installed" CACHE PATH "The path to the wsnet installation directory" FORCE)
endif()
list(APPEND CMAKE_MODULE_PATH ${WSNET_CMAKE_PATH})
list(APPEND CMAKE_MODULE_PATH ${WSNET_CMAKE_PATH}/Modules)
# -----------------------------------------------------------------------------
# Set the correct CMake policies
# -----------------------------------------------------------------------------
include(WSNETPolicy)
wsnet_policy()
# -----------------------------------------------------------------------------
# Declare the name of the project
# -----------------------------------------------------------------------------
project(WSNET)
# -----------------------------------------------------------------------------
# Load all auxiliary files
# -----------------------------------------------------------------------------
include(WSNETSystemConfig)
include(WSNETBuildConfig)
include(WSNETCompilerSettings)
include(WSNETDependencies)
include(WSNETExecutable)
include(WSNETTests)
# -----------------------------------------------------------------------------
# Add ccache(if possible), compiler options, linker options and definitions
# -----------------------------------------------------------------------------
wsnet_try_ccache()
wsnet_add_compiler_options()
wsnet_add_linker_options()
wsnet_add_defitions()
# -----------------------------------------------------------------------------
# Build configurations
# -----------------------------------------------------------------------------
wsnet_build_config()
# -----------------------------------------------------------------------------
# Test configurations
# -----------------------------------------------------------------------------
wsnet_test_config_core()
# -----------------------------------------------------------------------------
# Add the subdirs of the project
# -----------------------------------------------------------------------------
add_subdirectory(libraries)
add_subdirectory(kernel)
add_subdirectory(models)