Suggested by Diego Biurrun and James Almer.
Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
camellia \
color_utils \
cpu \
- cpu_init \
crc \
des \
dict \
tea \
TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo
+TESTPROGS-$(HAVE_THREADS) += cpu_init
TOOLS = crypto_bench ffhash ffeval ffescape
#include <stdio.h>
#include <string.h>
-#include "config.h"
-
#include "libavutil/cpu.h"
#include "libavutil/thread.h"
-#if HAVE_PTHREADS
static void *thread_main(void *arg)
{
int *flags = arg;
*flags = av_get_cpu_flags();
return NULL;
}
-#endif
-
int main(void)
{
-#if HAVE_PTHREADS
int cpu_flags1;
int cpu_flags2;
int ret;
return 2;
if (cpu_flags1 != cpu_flags2)
return 3;
-#endif
return 0;
}
fate-cpu: CMD = runecho libavutil/tests/cpu $(CPUFLAGS:%=-c%) $(THREADS:%=-t%)
fate-cpu: REF = /dev/null
-FATE_LIBAVUTIL += fate-cpu_init
+FATE_LIBAVUTIL-$(HAVE_THREADS) += fate-cpu_init
fate-cpu_init: libavutil/tests/cpu_init$(EXESUF)
fate-cpu_init: CMD = run libavutil/tests/cpu_init
fate-cpu_init: REF = /dev/null