From 2a834fc73f78d20d84b61e0430b752d1770edf75 Mon Sep 17 00:00:00 2001 From: nxrighthere Date: Fri, 26 Jul 2019 11:52:02 +0500 Subject: [PATCH 1/2] Fix compilation under Windows with MinGW --- src/common/arraymap.c | 1 + src/libm/CMakeLists.txt | 2 +- src/quad/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/arraymap.c b/src/common/arraymap.c index 43d44910..98df30f4 100644 --- a/src/common/arraymap.c +++ b/src/common/arraymap.c @@ -28,6 +28,7 @@ static FILE *OPENTMPFILE() { return tmpfile(); } static void CLOSETMPFILE(FILE *fp) { fclose(fp); } #else #include +#include static void FLOCK(FILE *fp) { } static void FUNLOCK(FILE *fp) { } diff --git a/src/libm/CMakeLists.txt b/src/libm/CMakeLists.txt index 4b26e36d..061d81e3 100644 --- a/src/libm/CMakeLists.txt +++ b/src/libm/CMakeLists.txt @@ -22,7 +22,7 @@ foreach(SIMD ${SLEEF_HEADER_LIST}) list(APPEND SLEEF_HEADER_COMMANDS COMMAND $ ${HEADER_PARAMS_${SIMD}} >> ${SLEEF_INCLUDE_HEADER}) endforeach() -if(MSVC) +if(WIN32) string(REPLACE "/" "\\" sleef_footer_input_file "${SLEEF_ORG_FOOTER}") list(APPEND SLEEF_HEADER_COMMANDS COMMAND type ${sleef_footer_input_file} >> ${SLEEF_INCLUDE_HEADER}) else() diff --git a/src/quad/CMakeLists.txt b/src/quad/CMakeLists.txt index 00e6dd04..66c24849 100644 --- a/src/quad/CMakeLists.txt +++ b/src/quad/CMakeLists.txt @@ -60,7 +60,7 @@ foreach(SIMD ${SLEEFQUAD_SUPPORTED_EXT}) endif() endforeach() -if(MSVC) +if(WIN32) string(REPLACE "/" "\\" sleef_footer_input_file "${SLEEFQUAD_ORG_FOOTER}") list(APPEND SLEEF_HEADER_COMMANDS COMMAND type ${sleef_footer_input_file} >> ${SLEEFQUAD_INCLUDE_HEADER}) else() From 928d1a003d4161d4bd7f0d8334155112e16ba298 Mon Sep 17 00:00:00 2001 From: nxrighthere Date: Fri, 26 Jul 2019 21:06:43 +0500 Subject: [PATCH 2/2] Restore condition for Jenkins CI --- src/libm/CMakeLists.txt | 2 +- src/quad/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libm/CMakeLists.txt b/src/libm/CMakeLists.txt index 061d81e3..7bf2c288 100644 --- a/src/libm/CMakeLists.txt +++ b/src/libm/CMakeLists.txt @@ -22,7 +22,7 @@ foreach(SIMD ${SLEEF_HEADER_LIST}) list(APPEND SLEEF_HEADER_COMMANDS COMMAND $ ${HEADER_PARAMS_${SIMD}} >> ${SLEEF_INCLUDE_HEADER}) endforeach() -if(WIN32) +if(MSVC OR MINGW AND WIN32) string(REPLACE "/" "\\" sleef_footer_input_file "${SLEEF_ORG_FOOTER}") list(APPEND SLEEF_HEADER_COMMANDS COMMAND type ${sleef_footer_input_file} >> ${SLEEF_INCLUDE_HEADER}) else() diff --git a/src/quad/CMakeLists.txt b/src/quad/CMakeLists.txt index 66c24849..6aabd995 100644 --- a/src/quad/CMakeLists.txt +++ b/src/quad/CMakeLists.txt @@ -60,7 +60,7 @@ foreach(SIMD ${SLEEFQUAD_SUPPORTED_EXT}) endif() endforeach() -if(WIN32) +if(MSVC OR MINGW AND WIN32) string(REPLACE "/" "\\" sleef_footer_input_file "${SLEEFQUAD_ORG_FOOTER}") list(APPEND SLEEF_HEADER_COMMANDS COMMAND type ${sleef_footer_input_file} >> ${SLEEFQUAD_INCLUDE_HEADER}) else()