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 15, 2024
1 parent a3de2c9 commit ce23e6e
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 @@ -287,7 +287,7 @@ if(CMAKE_GENERATOR MATCHES "Make|Ninja")
# guarantee that the flags appear at the end of the command line.
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.")
if(SECP256K1_APPEND_CFLAGS)
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 ce23e6e

Please sign in to comment.