mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
670aadcf1b
For a moment there, I was starting to think that I might have found a good feature in cmake, but then it turned out that it had specific ordering requirements and strange cryptic functions that error out in mysterious ways. If I am going to have an antique build engine with special quirks that I must learn in order to use it, I may as well choose the one that is not also trying to be clever and hiding its internal magic from me. Which means that I still prefer Makefiles - they are more debuggable.
37 lines
903 B
Bash
Executable File
37 lines
903 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Well, cmake might be approximately the same as ./configure && make, but it
|
|
# never rolls off the fingers as easily
|
|
#
|
|
|
|
if [ ! -f CMakeLists.txt ]; then
|
|
echo ERROR: run this script from the TOPDIR
|
|
exit 1
|
|
fi
|
|
|
|
OPTS=""
|
|
#OPTS+=" -DN2N_OPTION_USE_PTHREAD=ON"
|
|
#OPTS+=" -DN2N_OPTION_USE_OPENSSL=ON"
|
|
#OPTS+=" -DN2N_OPTION_USE_CAPLIB=ON"
|
|
#OPTS+=" -DN2N_OPTION_USE_PCAPLIB=ON"
|
|
#OPTS+=" -DN2N_OPTION_USE_ZSTD=ON"
|
|
#OPTS+=" -DN2N_OPTION_USE_PORTMAPPING=ON"
|
|
|
|
set -e
|
|
|
|
rm -rf build
|
|
|
|
cmake -E make_directory build
|
|
cd build
|
|
|
|
# Shell check wants me to use an array in this scenario. Bourne shell
|
|
# arrays are my line in the sand showing that a script should not be
|
|
# written in such a horrible language. Since it would be silly to rewrite
|
|
# a one-page wrapper script in python, we submit that this check is wrong.
|
|
# shellcheck disable=SC2086
|
|
cmake $OPTS ..
|
|
|
|
cmake --build . --config Release
|
|
|
|
ctest
|