Skip to content

Commit ce23e6e

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 a3de2c9 commit ce23e6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ if(CMAKE_GENERATOR MATCHES "Make|Ninja")
287287
# guarantee that the flags appear at the end of the command line.
288288
set(SECP256K1_APPEND_CFLAGS "" CACHE STRING "Compiler 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.")
289289
if(SECP256K1_APPEND_CFLAGS)
290-
string(APPEND CMAKE_C_COMPILE_OBJECT " ${SECP256K1_APPEND_CFLAGS}")
290+
string(REPLACE "<FLAGS>" "<FLAGS> ${SECP256K1_APPEND_CFLAGS}" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
291291
endif()
292292

293293
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)