2018-01-05 10:12:20 +01:00
|
|
|
if (HB_CHECK)
|
2018-01-01 08:47:51 +01:00
|
|
|
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am" MAKEFILEAM)
|
2018-03-15 21:04:31 +01:00
|
|
|
extract_make_variable (hb_shape_fuzzer_SOURCES ${MAKEFILEAM})
|
2018-03-15 03:15:33 +01:00
|
|
|
extract_make_variable (hb_subset_fuzzer_SOURCES ${MAKEFILEAM})
|
2018-01-05 10:12:20 +01:00
|
|
|
|
|
|
|
# TODO: enable these two
|
|
|
|
#extract_make_variable (FUZZING_CPPFLAGS ${MAKEFILEAM}) # extracting regex fail
|
2018-03-15 21:04:31 +01:00
|
|
|
#add_executable (hb-shape-fuzzer # it should be run only after ragel execution
|
2018-01-05 10:12:20 +01:00
|
|
|
# ${project_sources} ${project_extra_sources} ${project_headers}
|
2018-03-15 21:04:31 +01:00
|
|
|
# ${hb_shape_fuzzer_SOURCES})
|
2018-01-05 10:12:20 +01:00
|
|
|
|
2018-03-15 21:04:31 +01:00
|
|
|
add_executable (hb-shape-fuzzer ${hb_shape_fuzzer_SOURCES})
|
|
|
|
target_link_libraries (hb-shape-fuzzer harfbuzz)
|
2018-01-05 10:12:20 +01:00
|
|
|
|
2018-03-15 03:15:33 +01:00
|
|
|
add_executable (hb-subset-fuzzer ${hb_subset_fuzzer_SOURCES})
|
|
|
|
target_link_libraries (hb-subset-fuzzer harfbuzz-subset)
|
|
|
|
|
2018-03-15 21:04:31 +01:00
|
|
|
target_compile_definitions(hb-shape-fuzzer PUBLIC ${FUZZING_CPPFLAGS})
|
2018-03-15 03:15:33 +01:00
|
|
|
target_compile_definitions(hb-subset-fuzzer PUBLIC ${FUZZING_CPPFLAGS})
|
|
|
|
|
2018-03-15 21:04:31 +01:00
|
|
|
add_test (NAME hb-shape-fuzzer
|
|
|
|
COMMAND "${PYTHON_EXECUTABLE}" run-shape-fuzzer-tests.py $<TARGET_FILE:hb-shape-fuzzer>
|
2018-01-01 08:47:51 +01:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
2018-03-15 03:15:33 +01:00
|
|
|
add_test (NAME hb-subset-fuzzer
|
2018-10-11 23:31:29 +02:00
|
|
|
COMMAND "${PYTHON_EXECUTABLE}" run-subset-fuzzer-tests.py $<TARGET_FILE:hb-subset-fuzzer>
|
2018-03-15 03:15:33 +01:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
2017-12-29 20:43:29 +01:00
|
|
|
endif ()
|