From b2274348e24f720196986fd29171858b3ee622a9 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 29 Aug 2019 01:00:43 +0200 Subject: [PATCH] CMake: Advertise CXX settings for fuzzer so that C++ tests will link fine --- expat/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 0226a4dc..98979aed 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -329,7 +329,8 @@ if(BUILD_fuzzers) if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") message(SEND_ERROR "Building fuzz targets without Clang (but ${CMAKE_C_COMPILER_ID}) " - "is not supported. Please set -DCMAKE_C_COMPILER=clang.") + "is not supported. Please set " + "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++.") endif() string(FIND "${CMAKE_EXE_LINKER_FLAGS}" "-fsanitize" sanitizer_present) @@ -338,6 +339,7 @@ if(BUILD_fuzzers) "There was no sanitizer present when building the fuzz targets. " "This is likely in error - consider adding " "-DCMAKE_C_FLAGS='-fsanitize=' and " + "-DCMAKE_CXX_FLAGS='-fsanitize=' and " "-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=' to your cmake " "execution.") endif() -- 2.40.0