mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
Merge "cpu.cmake: improve webp_check_compiler_flag output"
This commit is contained in:
commit
bf16a4b4f8
@ -1,7 +1,7 @@
|
|||||||
## Check for SIMD extensions.
|
## Check for SIMD extensions.
|
||||||
|
|
||||||
function(webp_check_compiler_flag WEBP_SIMD_FLAG)
|
function(webp_check_compiler_flag WEBP_SIMD_FLAG)
|
||||||
unset(WEBP_HAVE_FLAG_LOCAL CACHE)
|
unset(WEBP_HAVE_FLAG_${WEBP_SIMD_FLAG} CACHE)
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include \"${CMAKE_CURRENT_LIST_DIR}/../src/dsp/dsp.h\"
|
#include \"${CMAKE_CURRENT_LIST_DIR}/../src/dsp/dsp.h\"
|
||||||
int main(void) {
|
int main(void) {
|
||||||
@ -10,9 +10,9 @@ function(webp_check_compiler_flag WEBP_SIMD_FLAG)
|
|||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
" WEBP_HAVE_FLAG_LOCAL
|
" WEBP_HAVE_FLAG_${WEBP_SIMD_FLAG}
|
||||||
)
|
)
|
||||||
if(WEBP_HAVE_FLAG_LOCAL)
|
if(WEBP_HAVE_FLAG_${WEBP_SIMD_FLAG})
|
||||||
set(WEBP_HAVE_${WEBP_SIMD_FLAG} 1 PARENT_SCOPE)
|
set(WEBP_HAVE_${WEBP_SIMD_FLAG} 1 PARENT_SCOPE)
|
||||||
else()
|
else()
|
||||||
set(WEBP_HAVE_${WEBP_SIMD_FLAG} 0 PARENT_SCOPE)
|
set(WEBP_HAVE_${WEBP_SIMD_FLAG} 0 PARENT_SCOPE)
|
||||||
|
Loading…
Reference in New Issue
Block a user