Skip to content

Commit b66d0f2

Browse files
authored
Use default generator for oss_fuzz (#2047)
It appears ninja is not supported. Also, fix test_build.sh; SRC is the parent of openexr, not the repo itself. And add diagnostic output to cmake as well. Signed-off-by: Cary Phillips <[email protected]>
1 parent 1d5bb79 commit b66d0f2

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CMakePresets.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"configurePresets": [
99
{
1010
"name": "oss_fuzz",
11-
"generator": "Ninja",
1211
"cacheVariables": {
1312
"CMAKE_VERBOSE_MAKEFILE": "ON",
1413
"BUILD_SHARED_LIBS": "OFF",

src/test/oss-fuzz/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
#
1717

1818
message(STATUS "Configuring oss_fuzz with $ENV{LIB_FUZZING_ENGINE}")
19+
message(STATUS "SRC=$ENV{SRC}")
20+
message(STATUS "WORK=$ENV{WORK}")
21+
message(STATUS "OUT=$ENV{OUT}")
22+
message(status "CXX=$ENV{CXX}")
23+
message(status "CXX_FLAGS=$ENV{CXX_FLAGS}")
24+
message(status "CC=$ENV{CC}")
25+
message(status "CC_FLAGS=$ENV{CC_FLAGS}")
1926

2027
set(OPENEXR_FUZZERS openexr_exrcheck_fuzzer openexr_exrcorecheck_fuzzer)
2128
add_custom_target(oss_fuzz ALL

src/test/oss-fuzz/test_build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414

1515
set -x
1616

17-
export SRC="$(git rev-parse --show-toplevel)"
18-
export WORK="$(dirname $SRC)"
17+
export GIT_ROOT="$(git rev-parse --show-toplevel)"
18+
export WORK="$(dirname $GIT_ROOT)"
19+
export SRC=$WORK
1920
export OSS_FUZZ_HOME=$WORK/oss-fuzz/projects/openexr
2021
export OUT=$OSS_FUZZ_HOME/_out
2122

22-
export CXX=clang++
23+
export CXX=$(which g++)
2324
export CXX_FLAGS=""
24-
export CC=clang
25+
export CC=$(which gcc)
2526
export CC_FLAGS=""
2627

2728
# stub of a fuzzing engine, just to confirm the target builds

0 commit comments

Comments
 (0)