From: Andreas Beckmann Date: Wed, 16 Jan 2019 21:24:12 +0000 (+0000) Subject: [PATCH 1/2] add custom_try_compile_clang_silent macro X-Git-Tag: archive/raspbian/1.6-3+rpi1~1^2^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=22c97cbadc08238e6ff4f74be230b0b792d717e5;p=pocl.git [PATCH 1/2] add custom_try_compile_clang_silent macro Gbp-Pq: Name custom_try_compile_clang_silent.patch --- diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake index 0b7b32c..16edc2b 100644 --- a/cmake/LLVM.cmake +++ b/cmake/LLVM.cmake @@ -360,6 +360,11 @@ macro(custom_try_compile_clang SOURCE1 SOURCE2 RES_VAR) custom_try_compile_c_cxx("${CLANG}" "c" "${SOURCE1}" "${SOURCE2}" ${RES_VAR} "-c" ${ARGN}) endmacro() +# clang++ try-compile macro +macro(custom_try_compile_clang_silent SOURCE1 SOURCE2 RES_VAR) + custom_try_compile_c_cxx_silent("${CLANG}" "c" "${SOURCE1}" "${SOURCE2}" ${RES_VAR} "-c" ${ARGN}) +endmacro() + # clang++ try-link macro macro(custom_try_link_clang SOURCE1 SOURCE2 RES_VAR) set(RANDOM_FILENAME "${CMAKE_BINARY_DIR}/compile_test_${RNDNAME}.${SUFFIX}") @@ -768,7 +773,7 @@ endif() if(NOT DEFINED ${CL_DISABLE_HALF}) set(CL_DISABLE_HALF 0) message(STATUS "Checking fp16 support") - custom_try_compile_c_cxx_silent("${CLANG}" "c" "__fp16 callfp16(__fp16 a) { return a * (__fp16)1.8; };" "__fp16 x=callfp16((__fp16)argc);" RESV -c ${CLANG_TARGET_OPTION}${LLC_TRIPLE} ${CLANG_MARCH_FLAG}${LLC_HOST_CPU}) + custom_try_compile_clang_silent("__fp16 callfp16(__fp16 a) { return a * (__fp16)1.8; };" "__fp16 x=callfp16((__fp16)argc);" RESV ${CLANG_TARGET_OPTION}${LLC_TRIPLE} ${CLANG_MARCH_FLAG}${LLC_HOST_CPU}) if(RESV) set(CL_DISABLE_HALF 1) endif()