File: CMakeLists.txt

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (125 lines) | stat: -rw-r--r-- 3,455 bytes parent folder | download
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
123
124
125
#
# Copyright 2009- ECMWF.
#
# This software is licensed under the terms of the Apache Licence version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
#

# =======================================================
# EXE ecflow_server, if OpenSSL not enabled ${OPENSSL_LIBRARIES}, is empty

ecbuild_add_executable(
  TARGET
    ecflow_server
  SOURCES
    src/ecflow/server/ServerMain.cpp
  LIBS
    ecflow_all
    $<$<BOOL:${OPENSSL_FOUND}>:OpenSSL::SSL>
    Threads::Threads
    $<$<BOOL:${ZLIB_FOUND}>:ZLIB::ZLIB>
  DEFINITIONS
    $<$<BOOL:${ZLIB_FOUND}>:ECF_HTTP_COMPRESSION>
)
target_clangformat(ecflow_server)

# Override default behaviour that add RPATHS during install
# The only thing that seem to work is set INSTALL_RPATH to ""
# Using SKIP_BUILD_RPATH,BUILD_WITH_INSTALL_RPATH,INSTALL_RPATH_USE_LINK_PATH
# had no effect
#          
SET_TARGET_PROPERTIES(ecflow_server
  PROPERTIES
    INSTALL_RPATH ""
)

# use, i.e. don't skip the full RPATH for the build tree
#SET(CMAKE_SKIP_BUILD_RPATH  FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
#SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 

# the RPATH to be used when installing
#SET(CMAKE_INSTALL_RPATH "")

# don't add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
#SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)


# ================================================================================                         
# TEST
ecbuild_add_test(
  TARGET
    u_server
  LABELS
    unit nightly
  INCLUDES
    src
  SOURCES
    test/TestCheckPtSaver.cpp
    test/TestServerConfigurations.cpp
    test/TestServerEnvironment.cpp
    test/TestServer_main.cpp # test entry point
    test/TestServer.cpp
  LIBS
    ecflow_all
    test_scaffold
    Boost::boost # Boost header-only libraries must be available (namely unit_test_framework)
    $<$<BOOL:${OPENSSL_FOUND}>:OpenSSL::SSL>
    Threads::Threads
  TEST_DEPENDS
    u_base
)

target_clangformat(u_server CONDITION ENABLE_TESTS)

ecbuild_add_test(
  TARGET
    u_server_authentication
  LABELS
    unit
  SOURCES
    test/TestAuthentication.cpp
    test/TestAuthentication_main.cpp
  LIBS
    ecflow_all
    test_scaffold
    Boost::boost # Boost header-only libraries must be available (namely unit_test_framework)
  TEST_DEPENDS
    u_base
)
target_clangformat(u_server_authentication CONDITION ENABLE_TESTS)

# ================================================================================
# TEST
ecbuild_add_test(
  TARGET
    s_periodic_scheduler
  LABELS
    integration nightly
  INCLUDES
    src
  SOURCES
    test/TestPeriodicScheduler.cpp
    test/TestPeriodicScheduler_main.cpp # test entry point
  LIBS
    ecflow_all
    test_scaffold
    Boost::boost # Boost header-only libraries must be available (namely unit_test_framework)
    $<$<BOOL:${OPENSSL_FOUND}>:OpenSSL::SSL>
    Threads::Threads
  TEST_DEPENDS
    u_base
)

target_clangformat(s_periodic_scheduler CONDITION ENABLE_TESTS)

# ===================================================================
# install
# ===================================================================
install (TARGETS ecflow_server DESTINATION bin)