Skip to content

Commit

Permalink
cmake: Fix passing SECP256K1_APPEND_CFLAGS to clang-cl
Browse files Browse the repository at this point in the history
This change also makes the compile invocation string more natural by
ensuring flags do not follow source files.
  • Loading branch information
hebasto committed Dec 13, 2024
1 parent 491b299 commit debc50d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ if(NOT CMAKE_GENERATOR MATCHES "Visual Studio")
if(SECP256K1_APPEND_CFLAGS)
# Appending to this low-level rule variable is the only way to
# guarantee that the flags appear at the end of the command line.
string(APPEND CMAKE_C_COMPILE_OBJECT " ${SECP256K1_APPEND_CFLAGS}")
string(REPLACE "<FLAGS>" "<FLAGS> ${SECP256K1_APPEND_CFLAGS}" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
endif()

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.")
Expand Down

0 comments on commit debc50d

Please sign in to comment.