From 317c9fbca66da298cb9b952b49681461cde9b1c7 Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Fri, 9 Jul 2021 05:30:53 +0800 Subject: [PATCH] Use `addSuffix` in place of cat/type Similar to 75b62aafe98279b1df636b1aaa330189ef637e53 (#396) for better support of MinGW. This fixes the regression caused by #266 when building for mingw under msys2. --- src/libm/CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libm/CMakeLists.txt b/src/libm/CMakeLists.txt index fe0a5d39..76412fa5 100644 --- a/src/libm/CMakeLists.txt +++ b/src/libm/CMakeLists.txt @@ -182,12 +182,7 @@ foreach(SIMD ${SLEEF_HEADER_LIST}) list(APPEND SLEEF_HEADER_COMMANDS COMMAND $ ${HEADER_PARAMS_${SIMD}} >> ${SLEEF_INCLUDE_HEADER}) endforeach() -if((MSVC OR MINGW AND WIN32) OR SLEEF_CLANG_ON_WINDOWS) - string(REPLACE "/" "\\" sleef_footer_input_file "${SLEEF_ORG_FOOTER}") - list(APPEND SLEEF_HEADER_COMMANDS COMMAND type ${sleef_footer_input_file} >> ${SLEEF_INCLUDE_HEADER}) -else() - list(APPEND SLEEF_HEADER_COMMANDS COMMAND cat ${SLEEF_ORG_FOOTER} >> ${SLEEF_INCLUDE_HEADER}) -endif() +list(APPEND SLEEF_HEADER_COMMANDS COMMAND $ ${SLEEF_ORG_FOOTER} >> ${SLEEF_INCLUDE_HEADER}) add_custom_command(OUTPUT ${SLEEF_INCLUDE_HEADER} ${SLEEF_HEADER_COMMANDS} @@ -195,6 +190,7 @@ add_custom_command(OUTPUT ${SLEEF_INCLUDE_HEADER} ${SLEEF_ORG_HEADER} ${SLEEF_ORG_FOOTER} ${TARGET_MKRENAME} + addSuffix ) # --------------------------------------------------------------------