X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/84a8af3dfe5e6cd980d1d3c767cfd0ae302444be..14dea51007733c2c321aa6c5b79dea5efe6aafe5:/tools/cmake/CompleteInFiles.cmake 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)