#!/bin/bash -eux1# Copyright 2019 Google Inc.2#3# Licensed under the Apache License, Version 2.0 (the "License");4# you may not use this file except in compliance with the License.5# You may obtain a copy of the License at6#7# http://www.apache.org/licenses/LICENSE-2.08#9# Unless required by applicable law or agreed to in writing, software10# distributed under the License is distributed on an "AS IS" BASIS,11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12# See the License for the specific language governing permissions and13# limitations under the License.14#15################################################################################1617mkdir build18cd build19# We disable libcbor's default sanitizers since we'll be configuring them ourselves via CFLAGS.20cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX="$WORK" -D SANITIZE=OFF ..21make "-j$(nproc)"22make install2324$CXX $CXXFLAGS -std=c++11 "-I$WORK/include" \25../oss-fuzz/cbor_load_fuzzer.cc -o "$OUT/cbor_load_fuzzer" \26$LIB_FUZZING_ENGINE src/libcbor.a27282930