Skip to content

Commit debc50d

Browse files
committed
cmake: Fix passing SECP256K1_APPEND_CFLAGS to clang-cl
This change also makes the compile invocation string more natural by ensuring flags do not follow source files.
1 parent 491b299 commit debc50d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ if(NOT CMAKE_GENERATOR MATCHES "Visual Studio")
285285
if(SECP256K1_APPEND_CFLAGS)
286286
# Appending to this low-level rule variable is the only way to
287287
# guarantee that the flags appear at the end of the command line.
288-
string(APPEND CMAKE_C_COMPILE_OBJECT " ${SECP256K1_APPEND_CFLAGS}")
288+
string(REPLACE "<FLAGS>" "<FLAGS> ${SECP256K1_APPEND_CFLAGS}" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
289289
endif()
290290

291291
set(SECP256K1_APPEND_LDFLAGS "" CACHE STRING "Linker flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")

0 commit comments

Comments
 (0)