[x265] [PATCH] Added cmake support to pass along build flags to yasm
dtyx265 at gmail.com
dtyx265 at gmail.com
Mon Dec 29 22:32:37 CET 2014
# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1419888680 28800
# Node ID 143f81ed72f166dee5df756deb0e1de5c83f5949
# Parent 38d2d0878acd2029e76dfa76c96c3f7eb1818e71
Added cmake support to pass along build flags to yasm.
This is particularly helpful when debugging.
diff -r 38d2d0878acd -r 143f81ed72f1 source/cmake/CMakeASM_YASMInformation.cmake
--- a/source/cmake/CMakeASM_YASMInformation.cmake Thu Dec 25 13:15:56 2014 +0900
+++ b/source/cmake/CMakeASM_YASMInformation.cmake Mon Dec 29 13:31:20 2014 -0800
@@ -35,6 +35,19 @@
else()
list(APPEND ASM_FLAGS -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8)
endif()
+
+list(APPEND ASM_FLAGS "${CMAKE_ASM_YASM_FLAGS}")
+
+if(CMAKE_BUILD_TYPE MATCHES Release)
+ list(APPEND ASM_FLAGS "${CMAKE_ASM_YASM_FLAGS_RELEASE}")
+elseif(CMAKE_BUILD_TYPE MATCHES Debug)
+ list(APPEND ASM_FLAGS "${CMAKE_ASM_YASM_FLAGS_DEBUG}")
+elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel)
+ list(APPEND ASM_FLAGS "${CMAKE_ASM_YASM_FLAGS_MINSIZEREL}")
+elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
+ list(APPEND ASM_FLAGS "${CMAKE_ASM_YASM_FLAGS_RELWITHDEBINFO}")
+endif()
+
set(YASM_FLAGS ${ARGS} ${ASM_FLAGS} PARENT_SCOPE)
string(REPLACE ";" " " CMAKE_ASM_YASM_COMPILER_ARG1 "${ARGS}")
More information about the x265-devel
mailing list