-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
165 lines (146 loc) · 6.25 KB
/
Copy pathMakefile
File metadata and controls
165 lines (146 loc) · 6.25 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
.PHONY: all
all: \
debian_11_release_gcc_10
windows_posixthreads: BUILD_TYPE=Release
windows_posixthreads: BUILD_DIR=build_win
windows_posixthreads: CPACK_GENERATOR=ZIP
windows_posixthreads: DOCKER_IMAGE=sirehna/base-image-win64-gccx-posixthreads:20210210-6e8b3c5
windows_posixthreads: BOOST_ROOT=/usr/src/mxe/usr/x86_64-w64-mingw32.static.posix
windows_posixthreads: CREATE_INDIVIDUAL_LIBRARIES=False
windows_posixthreads: ci_env=
windows_posixthreads: windows_cmake windows_build windows_test
windows_win32threads: BUILD_TYPE=Release
windows_win32threads: BUILD_DIR=build_win32threads
windows_win32threads: CPACK_GENERATOR=ZIP
windows_win32threads: DOCKER_IMAGE=sirehna/base-image-win64-gccx-win32threads
windows_win32threads: BOOST_ROOT=/usr/src/mxe/usr/x86_64-w64-mingw32.static
windows_win32threads: CREATE_INDIVIDUAL_LIBRARIES=False
windows_win32threads: ci_env=
windows_win32threads: windows_cmake windows_build windows_test
debian_9_release_gcc_6: BUILD_TYPE=Release
debian_9_release_gcc_6: BUILD_DIR=build_deb9
debian_9_release_gcc_6: CPACK_GENERATOR=DEB
debian_9_release_gcc_6: DOCKER_IMAGE=sirehna/base-image-debian9-gcc6
debian_9_release_gcc_6: BOOST_ROOT=/opt/boost
debian_9_release_gcc_6: CREATE_INDIVIDUAL_LIBRARIES=True
debian_9_release_gcc_6: ci_env=
debian_9_release_gcc_6: linux_cmake linux_build linux_test
debian_10_release_gcc_8: BUILD_TYPE=Release
debian_10_release_gcc_8: BUILD_DIR=build_deb10
debian_10_release_gcc_8: CPACK_GENERATOR=DEB
debian_10_release_gcc_8: DOCKER_IMAGE=sirehna/base-image-debian10-gcc8
debian_10_release_gcc_8: BOOST_ROOT=/opt/boost
debian_10_release_gcc_8: CREATE_INDIVIDUAL_LIBRARIES=True
debian_10_release_gcc_8: ci_env=
debian_10_release_gcc_8: linux_cmake linux_build linux_test
debian_10_debug_gcc_8: BUILD_TYPE=Debug
debian_10_debug_gcc_8: BUILD_DIR=build_deb10_debug
debian_10_debug_gcc_8: CPACK_GENERATOR=DEB
debian_10_debug_gcc_8: DOCKER_IMAGE=sirehna/base-image-debian10-gcc8
debian_10_debug_gcc_8: BOOST_ROOT=/opt/boost
debian_10_debug_gcc_8: CREATE_INDIVIDUAL_LIBRARIES=True
debian_10_debug_gcc_8: ci_env=
debian_10_debug_gcc_8: linux_cmake linux_build linux_test
debian_10_coverage_gcc_8: BUILD_TYPE=Coverage
debian_10_coverage_gcc_8: BUILD_DIR=build_deb10_coverage
debian_10_coverage_gcc_8: CPACK_GENERATOR=DEB
debian_10_coverage_gcc_8: DOCKER_IMAGE=sirehna/base-image-debian10-gcc8-xdyn
debian_10_coverage_gcc_8: BOOST_ROOT=/opt/boost
debian_10_coverage_gcc_8: CREATE_INDIVIDUAL_LIBRARIES=True
debian_10_coverage_gcc_8: ci_env=`bash <(curl -s https://codecov.io/env)`
debian_10_coverage_gcc_8: linux_cmake linux_build linux_test
debian_10_profile_gcc_8: BUILD_TYPE=Profile
debian_10_profile_gcc_8: BUILD_DIR=build_deb10_profile
debian_10_profile_gcc_8: CPACK_GENERATOR = DEB
debian_10_profile_gcc_8: DOCKER_IMAGE = sirehna/base-image-debian10-gcc8-xdyn
debian_10_profile_gcc_8: BOOST_ROOT = /opt/boost
debian_10_profile_gcc_8: CREATE_INDIVIDUAL_LIBRARIES=True
debian_10_profile_gcc_8: ci_env=
debian_10_profile_gcc_8: linux_cmake linux_build linux_test
debian_11_release_gcc_10: BUILD_TYPE=Release
debian_11_release_gcc_10: BUILD_DIR=build_deb11
debian_11_release_gcc_10: CPACK_GENERATOR=DEB
debian_11_release_gcc_10: DOCKER_IMAGE=sirehna/base-image-debian11-gcc10:2021-12-12
debian_11_release_gcc_10: BOOST_ROOT=/opt/boost
debian_11_release_gcc_10: CREATE_INDIVIDUAL_LIBRARIES=True
debian_11_release_gcc_10: ci_env=
debian_11_release_gcc_10: linux_cmake linux_build linux_test
centos_7_5_release_gcc_485: BUILD_TYPE=Profile
centos_7_5_release_gcc_485: BUILD_DIR=build_centos75
centos_7_5_release_gcc_485: CPACK_GENERATOR=ZIP
centos_7_5_release_gcc_485: DOCKER_IMAGE=sirehna/base-image-centos75-gcc485
centos_7_5_release_gcc_485: BOOST_ROOT=/opt/boost
centos_7_5_release_gcc_485: CREATE_INDIVIDUAL_LIBRARIES=True
centos_7_5_release_gcc_485: ci_env=
centos_7_5_release_gcc_485: linux_cmake linux_build linux_test
WORKING_DIRECTORY=/opt/share
DOCKER_RUN=docker run $(ci_env) \
--rm \
-u $(shell id -u):$(shell id -g) \
-v $(shell pwd):${WORKING_DIRECTORY} \
-w ${WORKING_DIRECTORY}/ssc/${BUILD_DIR} \
${DOCKER_IMAGE}
linux_cmake:
mkdir -p ssc/${BUILD_DIR}
${DOCKER_RUN} \
cmake -Wno-dev \
-G Ninja \
-D CREATE_INDIVIDUAL_LIBRARIES:BOOL=${CREATE_INDIVIDUAL_LIBRARIES} \
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
-D CMAKE_INSTALL_PREFIX:PATH=/opt/ssc \
-D IPOPT_ROOT:PATH=/opt/CoinIpopt \
-D BOOST_ROOT:PATH=${BOOST_ROOT} \
..
linux_build: linux_cmake
${DOCKER_RUN} \
ninja $(NB_OF_PARALLEL_BUILDS) package
linux_test:
${DOCKER_RUN} \
/bin/bash -c \
"./run_all_tests &&\
if [[ $(BUILD_TYPE) == Coverage ]];\
then\
echo Coverage;\
gprof run_all_tests gmon.out > gprof_res.txt 2> gprof_res.err;\
bash codecov_bash.sh && \
rm codecov_bash.sh;\
fi"
windows_cmake:
mkdir -p ssc/${BUILD_DIR}
mkdir -p ssc/${BUILD_DIR}/.wine
${DOCKER_RUN} /bin/bash -c " \
export WINEPREFIX=${WORKING_DIRECTORY}/ssc/${BUILD_DIR}/.wine \
&& wine winecfg \
&& cmake -Wno-dev -G Ninja \
-D CREATE_INDIVIDUAL_LIBRARIES:BOOL=${CREATE_INDIVIDUAL_LIBRARIES} \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX:PATH=${WORKING_DIRECTORY} \
-D CPACK_GENERATOR=ZIP \
-D BOOST_ROOT:PATH=${BOOST_ROOT} \
-D IPOPT_ROOT:PATH=/opt/CoinIpopt \
-D COIN_BLAS:PATH=/opt/CoinIpopt/lib/libcoinblas.a \
-D COIN_LAPACK:PATH=/opt/CoinIpopt/lib/libcoinlapack.a \
-D COIN_MUMPS:PATH=/opt/CoinIpopt/lib/libcoinmumps.a \
-D COIN_IPOPT:PATH=/opt/CoinIpopt/lib/libipopt.a \
-D IPOPT_INCLUDE_DIRS:PATH=/opt/CoinIpopt/include/coin \
-D IPOPT_LIB_DYNAMIC=\"gfortran;gcc;quadmath;m\" \
${WORKING_DIRECTORY}/ssc"
windows_build:
${DOCKER_RUN} /bin/bash -c " \
export WINEPREFIX=${WORKING_DIRECTORY}/ssc/${BUILD_DIR}/.wine \
&& wine winecfg \
&& ninja -j1 package"
windows_test:
${DOCKER_RUN} /bin/bash -c " \
export WINEPREFIX=${WORKING_DIRECTORY}/ssc/${BUILD_DIR}/.wine \
&& wine winecfg \
&& wine ./run_all_tests --gtest_filter=-WebSocketObserverTest*"
clean:
rm -rf ssc/build_*
lint:
@cd ssc && \
if grep --recursive --include={*.cpp,*.c,*.hpp,*.h,*.md,*.yml,*.cmake.*.xml,*.html,*.in,*.txt} \
--exclude-dir={eigen,f2c,gcovr,geographiclib,gmock,google-test,gtest,websocketpp,yaml-cpp,geometry,integrate,interpolation,rapidjson} -P "\t" . ; \
then echo "Tabs found in the lines shown above."; false; \
else echo "Repo passed no-tabs check."; fi && \
cd ..