harfbuzz/test/fuzzing/CMakeLists.txt
Chun-wei Fan eda6a5ea80 CMake: Fix running tests on Windows
For the API tests, output the test programs at $(TOP_BUILDDIR) so that
the freshly-built DLLs will be available for the test programs.  For
those that are run through the Python wrapper scripts, use
${PYTHON_EXECUTABLE} instead of plain 'python' in case the Python
interpreter is not in the PATH.
2018-03-13 20:17:58 +08:00

19 lines
750 B
CMake

if (HB_CHECK)
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am" MAKEFILEAM)
extract_make_variable (hb_fuzzer_SOURCES ${MAKEFILEAM})
# TODO: enable these two
#extract_make_variable (FUZZING_CPPFLAGS ${MAKEFILEAM}) # extracting regex fail
#add_executable (hb-fuzzer # it should be run only after ragel execution
# ${project_sources} ${project_extra_sources} ${project_headers}
# ${hb_fuzzer_SOURCES})
add_executable (hb-fuzzer ${hb_fuzzer_SOURCES})
target_link_libraries (hb-fuzzer harfbuzz)
target_compile_definitions(hb-fuzzer PUBLIC ${FUZZING_CPPFLAGS})
add_test (NAME hb-fuzzer
COMMAND "${PYTHON_EXECUTABLE}" run-fuzzer-tests.py $<TARGET_FILE:hb-fuzzer>
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif ()