agones.dev/agones@v1.53.0/build/build-sdk-images/cpp/build-sdk-test.sh (about) 1 #!/usr/bin/env bash 2 3 # Copyright 2020 Google LLC All Rights Reserved. 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 set -ex 18 GO111MODULE=off 19 DIR=/go/src/agones.dev/agones/test/sdk/cpp/ 20 echo "$DIR"/sdk 21 22 # Copy all CPP SDK files into a new directory 23 if [[ ! -d $DIR/sdk ]] 24 then 25 mkdir -p "$DIR"/sdk/.build 26 cp -r /go/src/agones.dev/agones/sdks/cpp/* $DIR/sdk 27 cd $DIR/sdk/.build 28 cmake .. -DCMAKE_BUILD_TYPE=Release -DAGONES_SILENT_OUTPUT=OFF \ 29 -DCMAKE_INSTALL_PREFIX=$DIR/sdk/.build -G "Unix Makefiles" -Wno-dev 30 else 31 echo "Directory with cpp SDK third party dependencies \ 32 has already built - using cached version. \ 33 Use make clean-sdk-conformance-tests if you want to start from scratch" 34 fi 35 cd $DIR/sdk/.build 36 cmake --build . --target install -j$(nproc) 37 cd $DIR && mkdir -p .build && cd .build 38 cmake .. -G "Unix Makefiles" \ 39 -DCMAKE_PREFIX_PATH=$DIR/sdk/.build \ 40 -Dagones_DIR=$DIR/sdk/.build/agones/cmake \ 41 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=.bin 42 cmake --build . --target install -j$(nproc)