From: DRC Date: Sat, 26 Nov 2016 00:50:11 +0000 (-0600) Subject: Build: Use wrapper script for gas-preprocessor.pl X-Git-Tag: 1.5.90~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94686e3c0fc37ff576d7c6bbc749f8c6d042193e;p=libjpeg-turbo Build: Use wrapper script for gas-preprocessor.pl The previous hack (adding ${CMAKE_ASM_COMPILER} to CMAKE_ASM_FLAGS) didn't work in all cases, because more recent versions of CMake place the includes ahead of the flags (which meant that the real assembler wasn't the first argument to gas-preprocessor.pl.) --- diff --git a/simd/CMakeLists.txt b/simd/CMakeLists.txt index 688a87f..a4a69b2 100755 --- a/simd/CMakeLists.txt +++ b/simd/CMakeLists.txt @@ -228,9 +228,8 @@ if(NOT RESULT EQUAL 0) return() else() message(STATUS "Using gas-preprocessor.pl") - set(CMAKE_REAL_ASM_COMPILER ${CMAKE_ASM_COMPILER}) - set(CMAKE_ASM_COMPILER gas-preprocessor.pl) - set(CMAKE_ASM_FLAGS "${CMAKE_REAL_ASM_COMPILER} ${CMAKE_ASM_FLAGS}") + configure_file(gas-preprocessor.in gas-preprocessor @ONLY) + set(CMAKE_ASM_COMPILER ${CMAKE_CURRENT_BINARY_DIR}/gas-preprocessor) endif() else() message(STATUS "GAS is working properly") diff --git a/simd/gas-preprocessor.in b/simd/gas-preprocessor.in new file mode 100755 index 0000000..560f788 --- /dev/null +++ b/simd/gas-preprocessor.in @@ -0,0 +1 @@ +gas-preprocessor.pl @CMAKE_ASM_COMPILER@ ${1+"$@"}