From: Martin Quinson Date: Sat, 19 Sep 2015 23:54:27 +0000 (+0200) Subject: [MinGW] bypass a broken detection: we do have asprintf here X-Git-Tag: v3_12~166 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/869cb09bd34ca3549868b4f86cc6a6dfb2c551d4 [MinGW] bypass a broken detection: we do have asprintf here --- diff --git a/tools/cmake/CompleteInFiles.cmake b/tools/cmake/CompleteInFiles.cmake index d4730daa72..8aed337eca 100644 --- a/tools/cmake/CompleteInFiles.cmake +++ b/tools/cmake/CompleteInFiles.cmake @@ -202,6 +202,14 @@ CHECK_SYMBOL_EXISTS(vsnprintf stdio.h HAVE_VSNPRINTF) CHECK_SYMBOL_EXISTS(asprintf stdio.h HAVE_ASPRINTF) CHECK_SYMBOL_EXISTS(vasprintf stdio.h HAVE_VASPRINTF) +if(MINGW) + # The detection of asprintf fails on MinGW, assumingly because it's + # defined as an inline function in stdio.h instead of a regular + # function. So force the result to be 1 despite of the test. + set(HAVE_ASPRINTF 1) + set(HAVE_VASPRINTF 1) +endif() + CHECK_FUNCTION_EXISTS(makecontext HAVE_MAKECONTEXT) CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP) CHECK_FUNCTION_EXISTS(process_vm_readv HAVE_PROCESS_VM_READV)