mirror of https://github.com/google/oss-fuzz.git
switch to cmake, find new headers (#3630)
This commit is contained in:
parent
1eea5653d2
commit
345abf4d38
|
@ -16,7 +16,7 @@
|
|||
|
||||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
MAINTAINER chriswwolfe@gmail.com
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool
|
||||
RUN apt-get update && apt-get install -y make cmake
|
||||
RUN git clone --depth 1 https://github.com/json-c/json-c.git json-c
|
||||
WORKDIR json-c
|
||||
COPY build.sh *.cc *.dict $SRC/
|
||||
|
|
|
@ -14,17 +14,17 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
./autogen.sh
|
||||
./configure --enable-static --disable-shared
|
||||
make -j$(nproc) all
|
||||
ar rc json_c.a *.o
|
||||
mkdir json-c-build
|
||||
cd json-c-build
|
||||
cmake -DBUILD_SHARED_LIBS=OFF ..
|
||||
make -j$(nproc)
|
||||
cd ..
|
||||
|
||||
cp $SRC/*.dict $OUT/
|
||||
|
||||
for f in $SRC/*_fuzzer.cc; do
|
||||
fuzzer=$(basename "$f" _fuzzer.cc)
|
||||
$CXX $CXXFLAGS -std=c++11 -I$SRC/json-c \
|
||||
$CXX $CXXFLAGS -std=c++11 -I$SRC/json-c -I$SRC/json-c/json-c-build\
|
||||
$SRC/${fuzzer}_fuzzer.cc -o $OUT/${fuzzer}_fuzzer \
|
||||
$LIB_FUZZING_ENGINE $SRC/json-c/json_c.a
|
||||
$LIB_FUZZING_ENGINE $SRC/json-c/json-c-build/libjson-c.a
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue