summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/2geom/tests/dependent-project/build-and-run.sh
blob: b7bb2dba08e6deb2770c0b0689efa824ec6a6f98 (plain)
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
#!/bin/bash

set -x
mkdir -p ../../opt2
mkdir -p build-as-subproject
(
    cd build-as-subproject;
    cmake ..  -D2GEOM_AS_SUBPROJECT=ON \
              -DCMAKE_INSTALL_PREFIX=../../../opt2
    make main -j 2
    ./main
    make install
)

mkdir -p build-with-find-package
(
    cd build-with-find-package;
    cmake .. -D2GEOM_AS_SUBPROJECT=OFF \
             -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" \
             -DCMAKE_INSTALL_PREFIX=../../../opt2 \
             -D2Geom_DIR="$PWD/../../../opt/lib/cmake/2Geom"
    make main -j 2
    ./main
    make install
)